Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

add_filter hook and the_content – no html

$
0
0

Replies: 0

I’m going to learn about plugins developing and I use some YT tutorial with 4.8 version of WordPress. In tut it works correctly, html tags work.
But my dev workspace is WP 5.8 and there is no html tags on output.
Sample code of plugin:

<?php

function my_add_text($content) {
return ‘<h1>Some header</h1>’ . $content;
}

add_filter(‘the_content’, ‘my_add_text’);
?>

What can I do to add html tags by add_filter hook?


Viewing all articles
Browse latest Browse all 59525

Trending Articles