• i used the same code to get the content of the page in my site.
    get_page_by_slug(‘slug-name’);
    i did the same and i could get the content in the version 3.9.2.but i could not get the content of the page using this code in version 4.0.
    what might be the cause?
    full code is here:
    <?php $page=get_page_by_slug(‘what-is-happy-hr’);?>
    <?php echo $page[0]->post_title;?>
    <?php echo apply_filters(‘the_content’,$page[0]->post_content);?>

The topic ‘get_page_by_slug('slug-name');’ is closed to new replies.