php - Wordpress using add action 'the content' deletes all pages content -


i using:

add_action('the_content' , 'statistics_page'); 

and in function 'statistics_page' put:

if(is_page(25)) { //blabla } 

this works on page want displayed on (25) other pages have content stripped, don't display anything.

how can fix this?

edit: info

website link: http://pauldekoning.com/wot
youll see home doesnt display text, nor forum page have forum.
statistic page displays something.

the_content filter should apply_filter instead of add_action , you've make sure return actual content function. try after updating code following.

apply_filters('the_content' , 'statistics_page');  function statistics_page($content){      if(  is_page(25) ) {          //blabla      }      return $content;  } 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -