Support Forum
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
<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.
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?
YELLOW
SWORDFISH
|
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.
YELLOW
SWORDFISH
|
1 Guest(s)