Support » Plugin: Display Posts Shortcode » [Plugin: Display Posts Shortcode] Display video from original post?

  • Resolved integritydesigns


    I have a blog category that is only for youtube videos and I’d like to display the most recent video in a div built into the site’s footer.php file.

    I have the youtube video displaying fine in the post itself, but the shortcode does not display the video in the footer. It only displays the posts title.

    Also, the site is being maintained upon completion by a school and they needed a simple solution to displaying a youtube video in the site’s footer. I’d love for them to be able to simply add a new youtube video post to the videos category and it display wherever I have the shortcode. Is this possible?

    Thanks ahead of time!

    (If it helps, here is the test sites url: It’s in development so please excuse the mess. The home page is not done yet, but you can view the row in the footer of any other page.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bill Erickson


    You’ll need to write a custom output filter to adjust what is displayed on output. The plugin lets you display the title and optional excerpt.

    If the video code is dropped in the post content, you just need to turn on full post content.

    If it’s in a custom field or you’re using oEmbed to convert a URL to video, you’ll need to write some code to display it.

    Where would I add this code? If I add it will it make every post display the full content or just the one I want? Sorry not a PHP guru yet 🙂 Thanks!

    Here is the code I have thus far within my footer.php file:
    <?php echo do_shortcode('[display-posts category="videos" posts_per_page="1" wrapper="div"]'); ?>

    Plugin Author Bill Erickson


    You would place the full post output filter in functions.php.

    If you only want to use it on some uses of the shortcode, change the output filter to this:

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Display Posts Shortcode] Display video from original post?’ is closed to new replies.