Display Single Posts In Tabs

This code enables you to hook in any number of tabs containing selected posts by post id. The code includes a comma separated list of post id’s which you can easily edit with your own choices.

You can also add a unique menu title for each post thats different to the entry title, ass seen in the above screenshot.

The code also enables you to modify the:

  • featured image size
  • featured image alignment
  • use any of the WP_Query parameters

By default, each tab contains the entry title, featured image and content which is limited in the code which you can easily modify.

Here’s the demo video

Demo Video

The demo video shows 8 selected posts each displayed in a tab with a custom menu title that is different to the single posts entry title.

The code includes the is_front_page() conditional tag so it only loads on the front page. Remove or modify this conditional tag for use on other pages.

Here’s the code for logged in members:

Related Tutorials

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.