• Resolved nickp8020

    (@nickp8020)


    In my very first CPT plugin, I tried

    add_filter('the_content', 'my_fun');

    and

    function my_fun($content){
    print_r($content); // Returns blank ???
    }

    Should $content be blank? Doesn’t it suppose to return data like get_page( $page_id );

Viewing 1 replies (of 1 total)
  • Thread Starter nickp8020

    (@nickp8020)

    Had to place it in the loop

    while (have_posts()){
                                                    the_post();
                                                    the_content();
                                                }

    Got resolved 🙂

Viewing 1 replies (of 1 total)

The topic ‘First CPT – Basic Question’ is closed to new replies.