Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 10-29-2009, 09:03 PM   #1
Bruce Hopkins
War Room Member
 
bhopkins's Avatar
 
Join Date: Mar 2006
Location: Atlanta, Georgia, USA.
Posts: 1,121
Thanks: 12
Thanked 74 Times in 31 Posts
Social Networking View Member's Twitter Profile 
Default For you Wordpress Plugin Gurus

I'm running into a little issue I was hoping some of you Wordpress developer gurus could give me a clue about.

I need to get the tags in a post form a call in the sidebar and I can't seem to make it work. Now I am by no means a PHP guru so I'm probably doing this all wrong.

First I tried to just call <?php the_tags('') ?> which works fine from within the loop, but not when called from the sidebar.

Then I tried <?php get_tags('') ?> and <?php get_the_tags ?>

And finally

<?php $post->get_the_tags('') ?>

Which pretty much keeps screwing up the site and causing it not to load.

I can't believe this is eluding me as it seems like it should be simple. All the examples I've found of using get_the_tags so using a function and returning a list with the links of the tags too. Since I don't really know php all that well yet( I'm learning), then I'm not sure how to translate the examples I've found to usable for me, plus I can't believe there is not just function I can call to get this text easily.

tia
Bruce

bhopkins is offline   Reply With Quote
Old 10-29-2009, 09:20 PM   #2
Gary Rodrigue
War Room Member
 
cage73's Avatar
 
Join Date: Dec 2006
Location: WV via New Orleans
Posts: 129
Blog Entries: 2
Thanks: 74
Thanked 105 Times in 26 Posts
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Default Re: For you Wordpress Plugin Gurus

Try this code.

<?php wp_tag_cloud( $args ); ?>

cage73 is offline   Reply With Quote
Old 10-29-2009, 09:28 PM   #3
I'm Kind Of A Big Deal
 
jasonmorgan's Avatar
 
Join Date: Sep 2009
Posts: 2,003
Thanks: 60
Thanked 448 Times in 321 Posts
Default Re: For you Wordpress Plugin Gurus

did you want all of your sites tags in the sidebar? then cage73 (up above) has given you the answer.

learn more here

Synthesize me, And reboot, I need to start again, I need to make it different

PLR
jasonmorgan is offline   Reply With Quote
Old 10-29-2009, 09:58 PM   #4
Bruce Hopkins
War Room Member
 
bhopkins's Avatar
 
Join Date: Mar 2006
Location: Atlanta, Georgia, USA.
Posts: 1,121
Thanks: 12
Thanked 74 Times in 31 Posts
Social Networking View Member's Twitter Profile 
Default Re: For you Wordpress Plugin Gurus

I don't want all the tags from the site. Just the ones that are in the current post that is displayed. So I need to pull the tags from the current post from single.php.

bhopkins is offline   Reply With Quote
Old 10-30-2009, 01:44 AM   #5
WordPress Cognoscente
War Room Member
 
Austin Delaney's Avatar
 
Join Date: Oct 2007
Location: Cheltenham , United Kingdom.
Posts: 478
Blog Entries: 1
Thanks: 55
Thanked 244 Times in 82 Posts
Default Re: For you Wordpress Plugin Gurus

Not sure if this will work:

Display Different Sidebar for Each Post and Page for WordPress

(there's also a plugin that will display sidebar widgets depending on post id but can't remember what it is)

Austin Delaney is offline   Reply With Quote
Old 10-30-2009, 02:45 AM   #6
HyperActive Warrior
 
Join Date: May 2005
Location: , , United Kingdom.
Posts: 372
Thanks: 0
Thanked 15 Times in 15 Posts
Social Networking View Member's FaceBook Profile  View Member's YouTube Profile
Contact Info
Send a message via MSN to markshields Send a message via Yahoo to markshields Send a message via Skype™ to markshields
Default Re: For you Wordpress Plugin Gurus

I had the same issue and I just used the info in the last post here and it worked for me, Thanks again

All My Secret Strategies Exposed - http://www.OneMillionIncome.com

View My Blog For $1000 + FREE Info - http://www.MarkMcCulloch.info

Decide Your Own Income - http://www.DecideYourIncome.eu
markshields is offline   Reply With Quote
Old 10-30-2009, 10:43 AM   #7
Bruce Hopkins
War Room Member
 
bhopkins's Avatar
 
Join Date: Mar 2006
Location: Atlanta, Georgia, USA.
Posts: 1,121
Thanks: 12
Thanked 74 Times in 31 Posts
Social Networking View Member's Twitter Profile 
Default Re: For you Wordpress Plugin Gurus

The main issue here is the sidebar is outside the loop. I found this article which gives a function that will make this work out great if anyone is interested.

Tags Outside The Loop In WordPress | Knee Deep In Code

Bruce

bhopkins is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
gurus, plugin, wordpress

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 01:41 AM.