dredub38
Forum Replies Created
-
Forum: Plugins
In reply to: Help with hack to exclude categoryYes! It works wonderfully.
Thank you Otto (and you as well boober).
Just in case anybody else ever has a similar need, I’ll post the final bit of code. Works great to exclude 1 or more categories when showing the latest headlines from related categories in the sidebar.
<?php // this is where 10 headlines from the current category get printed global $post; $categories = get_the_category(); foreach ($categories as $category) : if ($category->term_id == 3) continue; // replace 3 with the cat id to excluded if ($category->term_id == 4) continue; // replace 4 with the cat id to excluded ?> <li><h2>More from this category</h2> <ul class="bullets"> <?php $posts = get_posts('numberposts=10&category='. $category->term_id); foreach($posts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> <li><strong><a href="<?php echo get_category_link($category->term_id);?>" title="View all posts filed under <?php echo $category->name; ?>">Archive for '<?php echo $category->name; ?>' »</a></strong></li> </ul> </li> <?php endforeach; ?>Forum: Plugins
In reply to: Help with hack to exclude categoryThat didn’t work. It actually still displays the multiple categories, but didn’t show the information (bullet points) under them.
But I thank you for trying! π
Forum: Plugins
In reply to: Help with hack to exclude categoryWell it was worth a shot. π
Forum: Plugins
In reply to: Identify Category of Post, Insert CodeThat last line was superfluous.
It’s amazing how changing one freakin’ letter made it work. I am going to write this one down and sleep with it under my pillow so I remember it.
Moshu, I appreciate your help with this!
Forum: Plugins
In reply to: Identify Category of Post, Insert CodePerhaps “billy” or “steve”…
I think I’m close. Here is the code I’m trying in single.php
<?php if (is_category('13')) { echo 'yes '; } else { echo 'no '; } echo 'either way'; ?>That looks like it should work, but I always get the “no”. Am I doing something that is obviously wrong?
Forum: Plugins
In reply to: Identify Category of Post, Insert CodeI shall name my first born “moshu”!
Forum: Fixing WordPress
In reply to: Need to display category posts in templateWith that combination of patience and winning personality you’re sure to get TONS of free help from the WP community.
Forum: Plugins
In reply to: Change upload of image to contain custom html codeI realize this is a pretty old thread, but I was trying to figure out a similar problem and ran across it. The solution I found was in editing the following file in WP 2.3.1
wp-admin/js/upload.js
Forum: Fixing WordPress
In reply to: Problem With Conditional TagsBPartch, that absolutely helped me. I was able to modify it a little and it solved the single post part of my problem. (Thank You!)
<?php if(is_single() && in_category('13')){include ('podcast-feed.php');}?>A little more fiddin’ with it and I got it to work on my main index page as well
<?php if(in_category('13')){include ('podcast-feed.php');}?>My problem was that I was trying to use is_category rather than in_category
Thank you so much for your help.
Forum: Fixing WordPress
In reply to: Problem With Conditional TagsI am looking for the answer to this problem as well.
What I am trying to do is say ‘if this post is in category 13, then insert the contents of this php file’.
Specifically, I want to insert an subscription link in the header of any post that is in my podcast category, no matter where the post shows up – main index, archive, single post, etc.
I spent 2 hours looking on the forums, and another hour trying to figure it out using google. I apologize if I’ve missed the answer somewhere. Thanks in advance for any help you brainy folks can offer.
Forum: Plugins
In reply to: adding non-pages to pages-menuAs helpful as THAT is, does anybody else have any ideas? It would be really nice to have the three states (normal, hover, selected) on those links.
Is there any way to do that?
Forum: Plugins
In reply to: How to – Display Categories on Pages?Thanks for the info.