Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Add Shortcode inside index.php template of Wordpress


  • Please log in to reply
3 replies to this topic

#1 Luca Grattafiori

Luca Grattafiori

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 14 December 2011 - 05:18 AM

Hello, i've just create a countdown theme for Wordpress and i need to insert inside index.php the Tubepress shortcode, (cause i can't use widget and page/post content)

I've buy and istalled the last plugin Pro version 2_2_9
What can i do?

Thanks

Best regards
Luca Grattafiori
Tangherlini srl

#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 14 December 2011 - 11:35 PM

Hi Luca,

The instructions for using TubePress Pro in a WordPress template can be found here. Have you been able to give those a try? Let me know if you get hung up anywhere and I'll be glad to help. Thanks!

#3 < no first name > Graner

< no first name > Graner

    Member

  • Members
  • PipPip
  • 12 posts

Posted 25 December 2011 - 12:58 PM

Hi Folks,

I have followed the instructions properly and I can get the gallery to work when I put it outside of the loop but I'm trying to add the gallery so that it looks like it's part of the original content so above the comments and that doesn't seem to work.



I'm using this code above and like I said, it's showing up below the comments but not when I put this after "the content" below, is what I have below supposed to work? b/c it's just showing up empty...




#4 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 01 January 2012 - 10:16 PM

Please accept my apologies for taking so long to respond - I'm finally getting caught up after the holiday craziness.

Looks like this could be as simple as a small syntax error. Try this

<?php the_content(); ?><?php print TubePressPro::getHtmlForShortcode('mode="tag" tagValue="pittsburgh steelers" orderBy="relevance"'); ?>
instead of

<?php the_content(); ?><?php echo print TubePressPro::getHtmlForShortcode('mode="tag" tagValue="pittsburgh steelers" orderBy="relevance"'); ?>
Notice that you had "echo" and "print" back-to-back, which could very well cause all sorts of weirdness. Please give that a whirl and let us know how it works for you. Thanks.