• I’d like to use tab posts in a theme so my team doesn’t have to re-enter data. Is there a php alternative to the shortcode to help accomplish this?

    I tried the following but it displayed the data and [/tab] outside of the tabs.

    <?php echo do_shortcode('[tab name="Specifications"]'); ?>
        <p>something goes here</p>
    <?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[tab name="Resources"]'); ?>
    <?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[tab name="Accessories"]'); ?>
    <?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[tab name="Realted Products"]'); ?>
    <?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[end_tabset]'); ?>

    Any help is greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Here is your answer.

    <?php 
    
    do_shortcode("[mytab name='Specifications']
    
    Tab 1 content
    
    [/mytab]");  
    
    do_shortcode("[mytab name='Resources']
    
    Tab 2 content
    
    [/mytab];"); 
    
    do_shortcode("[mytab name='Accessories']
    
    Tab 3 content
    
    [/mytab];"); 
    
    do_shortcode("[mytab name='Related Products']
    
    Tab 4 content
    
    [/mytab];");  
    
    echo do_shortcode("[end_mytabset]");
    
    ?>

    Need a Game WordPress Theme? Check out https://wpgamethemes.com

    Hi,

    first of all i am not really PHP expert.

    I am working on a blog website.

    On home page they are looking for recent post to show up.
    on archive page it should be all the collection.

    I was wondering is there any how i can make categories to get data from recent post (which is on the home page) also same content on the archive.
    Please see:
    https://postimage.org/image/4k9wun6bv/

    Here is how i am thinking of getting post from archive and showing it on home page.

    Please give me any help will be appreciated.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress Post Tabs] Post tabs php for theming?’ is closed to new replies.