How to add a function to show a text (without JS) in every pages on Wordpress?
-
Please read How to Ask. Show us what you have tried, where and why you failed, and what your specific problem is. – fuxia♦ Mar 21 '17 at 4:44
Where do you want it to appear?
this function will put something before, or after, the content of each page.
function rt_before_after($content) {
$beforecontent = 'This goes before the content.';
$aftercontent = 'And this will come after.';
$fullcontent = $beforecontent . $content . $aftercontent;
return $fullcontent;
}
add_filter('the_content', 'rt_before_after');
If you want it somewhere in particular let me know where you want and I'll provide other options.