What is the difference between “manage_{$post_type}_posts_columns” and “manage_edit-{$post_type}_columns”?

What is the difference between manage_{$post_type}_posts_columns and manage_edit-{$post_type}_columns? Could somebody explain what is the difference between these two approaches? 2 Answers 2 It has to do with the way the admin post table is constructed. WordPress uses a class WP_Posts_List_Table to generate and handle that table. You’ll notice that there are a few tables in … Read more

List custom post type by custom tax term as page title

I have a page called “Developments” and I want to list all the Project posts by the custom tax Project Type using the page title as the term. This doesn’t work: <?php $title_slug = sanitize_title(wp_title($sep = ”)); $the_query = new WP_Query( array( ‘post_type’ => ‘project’, ‘tax_query’ => array( array ( ‘taxonomy’ => ‘project_type’, ‘field’ => … Read more

How to dynamically build a multiple taxonomy query loop within a post type’s single loop?

This question is a little different then the others floating around here. The most similar one is “How to get the parent’s taxonomy ?”. I have a music cms setup that utilizes two post types: album and album media and a few taxonomies: genre, year, and artist. In the footer of every single-album.php post I … Read more

“NOT ONLY IN” taxonomy query operator?

I have multiple users adding content to restricted categories (using RoleScoper) in my WordPress setup that don’t show up on the homepage (custom template with query_posts()). I’m looking for a way to “promote” the submitted content to the homepage by adding it to another category. My loop code looks like this: <?php query_posts($query_string . ‘&cat=-37’); … Read more

Function to show random posts from a category

Hi to all I’m trying to create a function that can ECHO the excerpt of a random post from a choosen category. What I did up to now is: <?php function $titoloslide() = { query_posts(array(‘orderby’ => ‘rand’, ‘category_name’ => ‘testimonianze’, ‘showposts’ => 1)); if (have_posts()) : while (have_posts()) : the_post(); “<div class=”testimonianzefurgonihome”><a href=”#” title=”Testimonianze noleggio … Read more

Search stores (custom postcode field) within 5, 10, 15 miles of user inputted postcode.. Code modification

I have been searching for a location search solution for wordpress.. The best semi-solution I have found is http://mondaybynoon.com/2010/02/22/store-locator-wordpress-pods The problem being is that I do not want to use Pods and wish to search in the custom fields of a post instead. I have a separate table set up with all UK postcodes + … Read more