• i included 3 pages in form of column in home page of wordpress site. when i used add_filter(the_content,function); it did just change the content of home page but did not changed the content of 3 included pages. Kindly do help me.

    Thanks in advance.
    Qasim

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Qasim Jan

    (@qasim-jan)

    Still i am waiting. kindly do help

    How did you include three pages in home page? Did you used wp_query and get three pages? Well, add_filter on the_content won’t work in that case.

    I assume your code is:

    add_filter( 'the_content', 'do_change' );
    function do_change( $content ){
      return PROCESSED DATa;
    }

    Now, when you print those three pages in home page like:

    echo $post->post_content;

    Change it to:

    echo do_change( $post->post_content );

    It should work.

    Thread Starter Qasim Jan

    (@qasim-jan)

    Thanks a lot for your kindness reply. i am using a theme and through this them i included 3 pages in the for column. please visit this link https://66.147.244.228/~verbingo/wordpress/ you will get i am saying. The Title of the pages are Centralized Workflow, Integration Anywhere, On-Demand Resources. In the Footer You will find a DropDown of Languages. Please change the Language, and then see the contents of these pages are not changing.

    Thanks in Addvance

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add_filter() does change content of recent page and does not change of included’ is closed to new replies.