Answer the question
In order to leave comments, you need to log in
How to insert text in header code (php)?
In the top bar, you need to place text between two widgets.
I want to add text directly to the code, but because of the curvature, the site crashes. help with inserting text with id
bar code looks like this
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div <?php presscore_top_bar_class( 'top-bar' ); ?>>
<div class="top-bar-bg" <?php presscore_top_bar_inline_style(); ?>></div>
<?php
if ( presscore_get_header_elements_list( 'top_bar_left' ) ) {
presscore_render_header_elements( 'top_bar_left', 'left-widgets' );
} else {
echo '<div class="mini-widgets left-widgets"></div>';
}
if ( presscore_get_header_elements_list( 'top_bar_right' ) ) {
presscore_render_header_elements( 'top_bar_right', 'right-widgets' );
} else {
echo '<div class="mini-widgets right-widgets"></div>';
}
?>
</div>
Answer the question
In order to leave comments, you need to log in
Anton R., yes it is, they divide it in half. The theme provides for adding a text widget to the bar. But first, the styles prescribed by the theme for the widget are triggered, and then which I set to the text. And there is a half-second jump when the page loads. I wanted to get rid of this by writing the text immediately in the header template. I understand that it's not so easy now
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question