How to add a function to show a text (without JS) in every pages on Wordpress?

closed as unclear what you're asking by Michael, cjbj, kraftner, bosco, Howdy_McGee Apr 7 '17 at 19:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.