How to show html after header from plugin?
-
How to show html after header from php-plugin?
-
Well if you want to see the html I would use my web browser’s browser inspector.
If you want to change the html in some way you should look for a filter of hook function. You will need to read your theme’s template and component files to see the names of which ones it uses.
The filter or hook functions could be incorporated into a plugin, but are more often put into yout theme’s “functions.php” file (preferably of a child theme).
I need show html after header into a plugin (php-code)…because I need show this html on all pages of my wordpress website..and on all templates.
-
This reply was modified 5 years, 5 months ago by
Чугаев Александр Александрович.
What do you mean by “show HTML”?
text+images+results of mysql query
So you want to generate content, not HTML in some raw format?
If you want to show something after the header, you need to look at how your theme displays the header and content, then use the right hook to insert your content.
Would this “text+images+results of mysql query” be part of the content, after the menu, before the menu, before the content, after the post title?
After the post’s title, I can showing html with this code:
function show_html($content) { $before = 'fshjjkhkdf'; $content = $before . $content . $after; return $content; } add_action('the_content','show_html');I need show html before the content…(before title of posts/pages)…
-
This reply was modified 5 years, 5 months ago by
Чугаев Александр Александрович.
-
This reply was modified 5 years, 5 months ago by
Чугаев Александр Александрович.
I founded solution:
function html_before_posts_title( $title, $id = null ) { $title = '<p style="font-size:14px;font-weight:normal;">gggggggggggggg</p>' . $title; return $title; } add_filter( 'the_title', html_before_posts_title', 10, 2 );Sorry..For show html or text in post/page…need use shortcodes.
-
This reply was modified 5 years, 5 months ago by
The topic ‘How to show html after header from plugin?’ is closed to new replies.