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

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.