ViewedYuzo – Related Posts – Using Shortcodes – How to?

  • Author
    Posts
  • Search Engine Mogul
    Participant

    Is it possible to add related posts in specific pages using shortcode? If yes, how please help.

    #5855
    iLen
    Keymaster

    Hi, inside the page.php file put:

    <?php 
    global $post;
    if( in_array($post->ID,[99,88,66,77]) ){ // where 99 is ID post page
        echo do_shortcode( '[yuzo_related]' );
    }
    ?>
    #5857
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.