Articles of categories

Creating links to a page displaying posts from a particular category

Ok so at the moment I have a page which displays a list of categories within my Taxonomy (event-themes), here’s the code: <div id=”themeSearch”> <h1 class=”mainSectionHeader”>By Theme</h1> <ul id=”themeSelector” class=”jcarousel jcarousel-skin-tango”> <?php //list custom portfolio categories $taxonomy = ‘event-themes’; // define portfolio categories from taxonomies in functions.php $tax_terms = get_terms($taxonomy); foreach ($tax_terms as $tax_term) { […]

Author Page – List of categories plus number of posts in that category

On my author page I currently have a list of categories the author has posted in generated by the following code: <?php $categories = $wpdb->get_results(” SELECT DISTINCT(terms.term_id) as ID,, terms.slug FROM $wpdb->posts as posts LEFT JOIN $wpdb->term_relationships as relationships ON posts.ID = relationships.object_ID LEFT JOIN $wpdb->term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id LEFT JOIN […]

Query the Loop without breaking it

Im trying to make different querys in my category like one with a offset of post and one that shows one post but while it continues to go through the loop, this is what i have but the loop keeps repeating itself i almost think im not doing it correctly. Anyone know whats wrong? <?php […]

get listed category's id?

ok – so i’m listing categories and their sub-categories. How can i get the ID of the category that’s being shown with a function? ( i know what it is in the admin ) ie /category/events/women-in-art/ women-in-art-ID = ? any help appreciated! Dan.

Add category to custom post type automatically, using category slug

I’m using this excellent function to automatically add a category to my custom post type “Videos” on publish, if there’s no category already chosen. This works great: function add_video_category_automatically($post_ID) { global $wpdb; if(!has_term(”,’category’,$post_ID)){ $cat = array(394); wp_set_object_terms($post_ID, $cat, ‘category’); } } add_action(‘publish_videos’, ‘add_video_category_automatically’); But, I’d really like to get the category ID via the slug, […]

Is changing post from category in a large blog a good practice?

I was reading this question “Changing post category based on its post date” because I have some similar situation… Also the majority of “featured post” plugins on wordpress works by specifying a “featured category”. my question is, Doesn’t that behavior create some “page not found” ?? What if google have your Category A cached, but […]

Thumbnail for categories / taxonomies plugin?

I’m looking for a nice way to attach an image as a thumbnail to a category. No plugin that I found does this. I have a category loop and it would nice to display a category thumbnail, not just the name and description.

Displaying Custom Posts

I came across a strange problem while working on my dev environment for a site we’re making. We have custom post types, so I’m not sure if that’s the reason why it’s not working correctly. However, I managed to get the posts to display 5 at a time instead of normal 10. However, in one […]

How to create a “latest news” page showing a list of posts from blog category

I am using the Modest theme from elegant themes at Under the slider on the homepage, there are three content areas that are generated from pages. I would like to make one of the content areas a “Latest News” element showing the last 5 posts from the blog (category = blog). Bearing in mind […]

Grouping post-types in loop

When a user selects a specific category from a drop-down a list of multiple post types is displayed. I’d like to display the data in groups with the post-type title above in a heading. I’m unsure how to segment into post-type groups. I spent a bit of time looking but didn’t find exactly what I […]