rwwood
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error When Implementing the Menu Management SystemIt doesn’t look like you’ve defined any arguments for wp_nav_menu(). Check out the examples on the wp_nav_menu() page.
Forum: Plugins
In reply to: [Plugin: Smartlinker] Error message upon activationYep, that took care of it. Thanks for your prompt support.
Forum: Themes and Templates
In reply to: Modifying post image output.I ended up using modified code from the “extra image tags” plugin in my function.php file to resolve this.
Forum: Plugins
In reply to: [Plugin: Smartlinker] Error message upon activationSorry, I didn’t see that someone had replied.
I’m using WP 3.0 and it’s running on one of BlueHosts servers, which are Linux boxes. I’m using FireFox 3.6.4 to which I just upgraded this morning. I haven’t tried installing the plugin since.
Thanks.
Forum: Plugins
In reply to: [Plugin: Smartlinker] Error message upon activationI’ve tried several times to activate this plugin, but always with the same results. Is there any support being provided for it?
Forum: Fixing WordPress
In reply to: Using get_cat_IDForum: Themes and Templates
In reply to: Template to list either sub-categories or postsForum: Themes and Templates
In reply to: Incorporating “category__in” into category.phpI figured out how to accomplish my purpose: listing posts for categories that have them and listing sub-categories for parent categories that have no posts. Here is the whole template for anyone else that might benefit from it.
<?php // Category.php, template for listing sub-categories or category posts ?> <?php get_header(); ?> <?php $cat_title = single_cat_title('', false); $category_id = get_cat_ID($cat_title); $wp_query->set('orderby', 'menu_order'); $wp_query->set('order', 'ASC'); $wp_query->get_posts(); get_posts("orderby=menu_order&order=ASC"); ?> <?php if ( in_category($category_id) ) : ?> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <h2 class="pagetitle"> <?php if (is_category()) { ?> Index for ‘<?php single_cat_title(); ?>’ <?php } ?> </h2> <div class="list-page"> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?>> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> </div> <?php endwhile; ?> </div> <?php endif; ?> <?php else : if ( is_category() ) { // If this is a category archive ?> <h2 class="pagetitle"> Index for ‘<?php single_cat_title(); ?>’ <?php $category_link = get_category_link( $category_id ); ?> </h2> <div class="list-page"> <ul> <?php wp_list_categories('orderby=name&child_of=4&title_li='); ?> </ul> </div> <?php } endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
Hope that helps
Forum: Themes and Templates
In reply to: Incorporating “category__in” into category.phpI changed the first bit of code to:
$wp_query->set('orderby', 'menu_order'); $wp_query->set('order', 'ASC'); $wp_query->set('category__in', array(4)); $wp_query->get_posts(); get_posts("orderby=menu_order&order=ASC&category__in=array(4)"); ?> <?php if (have_posts()) : ?>
But I get the same results: all posts from all sub-categories of category 4 get displayed.
Forum: Themes and Templates
In reply to: Strange output for get_cat_id()Duh. I read that article several times and tried to implement “false”, but didn’t have the syntax right. I totally missed the example given.
Thanks! That fixed it.
Forum: Themes and Templates
In reply to: Strange output for get_cat_id()I’m afraid that I’ve been reading that for quite some time, but nothing I’ve read resolves the problem I’m having. What are you referring to?
Forum: Themes and Templates
In reply to: Strange output for get_cat_id()Nope. That still returns Booklets0. If I use the actual category name, like
<?php $category_id = get_cat_ID( 'Booklets'); echo $category_id; ?>
I get the right return: 4 which is the cat ID for Booklets. That would be fine if I was trying to build a template for that one category, but I want it to be independent of which category is being viewed.
Forum: Themes and Templates
In reply to: Strange output for get_cat_id()Same result. I misread the output in my original post, though. What gets returned is Booklets0, not Booklets ()
Forum: Fixing WordPress
In reply to: Using get_cat_IDI should have mentioned why I used the title for the thread that I did. I’m trying to figure out how to use get_cat_ID to supply the “child_of” argument for wp_list_categories.
Thanks.
Forum: Plugins
In reply to: [Admin Management Xtended] Post orderRe-installed, works fine.