WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Post UI Tabs] do_shortcode code? (5 posts)

  1. kreion
    Member
    Posted 2 years ago #

    Hello,

    please help me, I have stucked on the invocation code for Post UI Tabs module (http://wordpress.org/extend/plugins/put/faq/)

    I have this:

    <?php echo do_shortcode('[tab name="2006"]'); ?><?php getActionsForYear(2006); ?> <?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[tab name="2007"]'); ?><?php getActionsForYear(2007); ?> <?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[tab name="2008"]'); ?> <?php getActionsForYear(2008); ?><?php echo do_shortcode('[/tab]'); ?>
    <?php echo do_shortcode('[end_tabset]'); ?>

    But it doesnt work =( Even in format when is my own PHP #getActions replaced with text. Anybody who knows how to get this plugin to work directly in theme?

    Thank you for any help!

  2. wpAB
    Member
    Posted 1 year ago #

    I've got the same problem. I thought it has something to do with using double quotes and single quotes (", ') in the location of "tab name=". I've not figured it out yet but maybe this will ring a bell and get this 1 step closer to the fix. Let me know if you got it to work. Seems like a cool plugin to use if we can get it to work like this.

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    a:
    I don;t think you can break the shortcode sections and use echo do_shortcode() on the segmments;
    you would need to have it all in one big do_shortcode() for which you need to find a way so that the stuff within the shortcode does not echo the results but return themas strings.

    b:
    if echo do_shortcode('[...]') does not work, try echo apply_filters('the_content','[...]') - but same considerations apply as under a:;

    @WordPress AB
    what is the exact code you are trying?

  4. wpAB
    Member
    Posted 1 year ago #

    @alchymyth

    I currently have the following code. I'm trying to setup Tabs in WP e-commerce single-product page. So that a long page of information, reviews and specs get seperated with Tabs.

    <?php echo do_shortcode("[tab name="Description"]"); ?>Your tab content<?php echo do_shortcode("[/tab]"); ?>
    <?php echo do_shortcode("[tab name="Specifications"]"); ?>Your tab content<?php echo do_shortcode("[/tab]"); ?>
    <?php echo do_shortcode("[tab name="Reviews"]"); ?>Your tab content<?php echo do_shortcode("[/tab]"); ?>
    <?php echo do_shortcode("[end_tabset]"); ?>

    it shows double quotations as you can see. I've tried differtent variations with single and double quotations and even the double-quote (\"). They all didn't work out for me. Thanks for all the help and effort.

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    no luck -

    after downloading and checking the plugin code, I could not find any possibility to get that to work (this does not mean it is impossible - might be just my limitations in understanding the plugin code);

    also, similar older topics stayed unanswered.

Topic Closed

This topic has been closed to new replies.

About this Topic