tnerb
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: current tag css classI take that back – I guess I am a PHP whiz ?? Just kidding! Not. But I was able to figure out how to code this, so that now I can mix tags with my categories and still have the current class attach. Sweet.
Forum: Fixing WordPress
In reply to: is_category conditional not working – my code?Hi richarduk. I’m no php expert but since it’s so difficult to get an answer on these forums, I’ll throw in my 2 cents. Your code snippet worked fine for me.
You did make sure that you have a category that actually has a numerical id of “7”, correct?
Forum: Plugins
In reply to: [Plugin: Twitpress] Updates twitter with draftsI didn’t see an author response – so wanted to follow up to ask if this turned out to be a valid issue. Do drafts indeed get sent to twitter with this plugin? …Or only published posts? Thanks!
Forum: Fixing WordPress
In reply to: Tag list with number of post related to tagssewmyheadon: you can just add another line, like this and add the tags you wish to include…
'include' => '1,2,3,4,5,6'
Otto42: If you get the chance, would you please take a look at my question above. Thanks.
Forum: Fixing WordPress
In reply to: Tag list with number of post related to tagsOtto42, the code block you provided above is very helpful. I’ve tried wrapping your echoed statement in LI and having a conditional class inside the LI but I just can’t get this to work.
Can you tell us how to incorporate a conditional class such as below into your code block. Sorry if this is not as clear as it could be – I’m not a programmer.
<li <?php if(is_tag('TheCurrentTag')){echo 'class="current-cat"';}?>>
Forum: Fixing WordPress
In reply to: current tag css classiridax, thanks for your input and that’s true what you say. But I still think there is a way to code a conditional class for the current tag – for when you’re on the current tag’s archive page. But I’m not the PHP whiz that can do it ??
Forum: Fixing WordPress
In reply to: current tag css classmikedev, I’m glad that worked for you. My problem (and I think also some of the others above) is that we’re using tags in navigation lists like categories. Below is how I list some categories and the li automatically gets the “current-cat” class, when on that category page and it allows me to style differently – works great.
I’d like to wrap a call listing tags in the same way but it doesn’t pull the “current-cat” class (since it’s a tag), so never styles as it should when on that tag page. We’d just like to know how to have a similar conditional class put on the current tag, so we could have it ‘current’ style like the categories do.
Thanks for sharing, though. Much appreciated. Someone will figure this out sooner or later. I’d even consider editing the core classes file, if I knew how to modify.
<li class="cat-group">SomeHeadingName</li> <ul class="cat-list"> <?php [call specific tags here] ?> </ul> </li>
Forum: Fixing WordPress
In reply to: current tag css classI also have tags in navigation with categories and need to know ‘current class’ for tags – anyone find out how to do this yet?