Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Any news on the Tags Plugin Upgrade 1.3
Avatar
Matthew Bonner
Member
Free Members
sp_UserOfflineSmall Offline
Jul 16, 2012 - 12:26 pm

Went to the codex page looking for help and saw that the page was "being worked on". I uploaded the plugin and used the tags for Topic Link adding it to my category.php file, while a custom image returned anything below the tag did not, leaving the category page blank. When I removed the tag the page returned everything including the custom image.

Template Tag:Topic link

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 16, 2012 - 2:44 pm

Sorry I am a bit lost here. Where exactly did you add the template tag? I

andy-signature.png
YELLOW
SWORDFISH
Avatar
Matthew Bonner
Member
Free Members
sp_UserOfflineSmall Offline
Jul 17, 2012 - 5:09 am

<div id="main">

<div class="block archive">

 <?php if (is_category('i-like-clowns')) : ?>

<?php sp_TopicLinkTag(

'topicId=10'

); ?>

<?php endif; ?>

 

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

....more code etc 

I've found that when I take the Simple-Press code out, everything works fine, including the custom images and text.
But when I attempt to add it again the page goes blank for everything under Simple-Press code, while the topic link doesn't even appear. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 17, 2012 - 5:53 am

It tests out here just fine. I am not sure why you have split it over 3 separate lines but that doesn't look good. I would just write that block without all of the php tags like:

<?php if (is_category('i-like-clowns')) {
    sp_TopicLinkTag( 'topicId=10&linkText=Your Link Text' );
} ?>

which also removes the 'endif' statement of course. This works fine here. Of course you need to supply a valid topic ID and surely you need some link text in there or there will be nothing to see.

Oh - and this is the Codex entry: http://codex.simple-press.com/.....opic-link/

Come back if that doesn't work...

Oh yes - I assume you do actually have the SP template tags plugin installed and active - yes?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Matthew Bonner
Member
Free Members
sp_UserOfflineSmall Offline
Jul 17, 2012 - 9:53 am

Is there an example or demo of the code in action? Here on SP? Maybe I'm doing something wrong, also I have to use 'endif" because I have more than one condition tag.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 17, 2012 - 10:28 am

OK - I just based the code on the part you showed me so my code just replaced what I saw.

No - we don't use that tag anywhere but I re-tested on a live site after your post this morning and t was working just fine.

You have not confirmed that you do have the 'template tags' plugin installed. If you want to post more of the fragment we are dealing with here I am happy to take another look at it.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625