Category page with gallery for each post

install an image gallery plugin like this one http://wordpress.org/plugins/image-gallery-reloaded/ and have a gallery set in each of your posts, then edit your theme’s category template and have a look at the loop, if it uses the_excerpt() then you have to alter it to the_content(). This way, you will have a gallery list in the category … Read more

Display only the latest post

Your query arguments, formatted to be readable, look like this: $args = array( ‘taxonomy’ => $taxonomy, ‘term’ => $term->slug, ‘posts_per_page’ => 1, ‘orderby’ => ‘modified’, ‘category’ => $str ); That does not match any argument pattern I see for WP_Query. I think you are trying to construct a tax_query but that should look like this: … Read more

Displaying just one post from each category on archive page

Don’t use query_posts() use the WP_Query class instead… the link to the Codex will also reference all the appropriate query parameters. The following would query the most recent post in a particular category, you will need to define the $category_id // The Query $query = new WP_Query( ‘cat’ => $category_id, ‘posts_per_page’ => 1 ); // … Read more

Rewrite category list as an if / else statement

See the comments in code for explaination // all the categories for the post $categories = get_the_category(); // extracts ids form post categories $categories_ids = wp_list_pluck( $categories, ‘term_id’ ); // all the categories id that are descendant of category 12 $children = get_terms(‘category’, array(‘child_of’=>12, ‘fields’=>’ids’) ); // all the categories id for the post that … Read more

Categories Going to different Blog Pages?

One way would be to create a template page, and in that page, you’d have the logic to display the categories you want to show. Your template page would look something like this: /* Template Name: Secondary Blog Page */ get_header(); /*Code for your custom category display*/ $customcats = new WP_Query(array( ‘cat’ => 12,13,15 //Category … Read more

Placement of categories

While you may not be able to integrate your categories list directly into the slider (this is dependent on how the slider is set up and I haven’t used this particular theme), it’s possible to display a list of categories and their links that functions in the way you’ve asked and then apply the same … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)