Automatically exclude categories from metabox based on title

You have chosen to tackle a hard problem for one so new to PHP. 🙂 This might get you closer to your goal: global $wpdb; if ( in_array( $pagenow, array(‘post.php’, ‘post-new.php’) ) ) { foreach (get_categories() as $category) { $cat_time = strtotime($category->cat_name); if ( $cat_time < strtotime(‘-3 days’) || $cat_time > strtotime(‘+2 months’) ) $exclude … Read more

Checkboxes in the category list?

You can do this with the Taxonomy Drill-Down plugin. Depending on your configuration, it might be better to create multiple taxonomies: one for brands, one for features, … Drill-down navigation widgets http://s.wordpress.org/extend/plugins/query-multiple-taxonomies/screenshot-1.png?r=389850

Trying to only display 1 category using get_posts

Did you try the example given in the codex? <?php global $post; $args = array( ‘numberposts’ => $number, ‘category’ => 6, ‘order’ => ‘ASC’, ‘orderby’ => ‘post_date’ ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <li><a href=”https://wordpress.stackexchange.com/questions/20091/<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endforeach; ?> This a modified version that … Read more

Subcategories with the same name

Two categories can have the same name (title) as long as they are not both parent (top level) categories and are not both children of the same parent category. No two categories can have the same nicename (slug). If there is a collision when creating a child category, WordPress will append the slug of the … Read more

Displaying a full post instead of a slug per category?

In the appropriate template file, you need to replace the_excerpt() with the_content(). As this is a change specific to a known category (i.e. “podcasts”), I would recommend creating a custom template file for that category, called category-podcasts.php, and making the change in that template file. To create this template file, look for (in order) category.php, … Read more

How do I call posts with a certain tag?

It’s because when you call query_posts, you’re overwriting the original query with a new one, you have to get the original query and reset the things you want to change. global $query_string; $per_page = get_option( ‘to_count_archives’ ); query_posts( $query_string . ‘&posts_per_page=” . $per_page );

query in category.php repeats itself

You should take the condition outide the loop meaning above <?php if (have_posts()) : while (have_posts()) : the_post(); ?> Therewise every time the loop begins it start the check instead of doing the check then starting the loop if the condition exist. Its hard for to understand because i dont understand div names but i … Read more