How to list out post category name and description in page

Use wp_list_categories Here’s all the parameters <?php $args = array( ‘show_option_all’ => ”, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘style’ => ‘list’, ‘show_count’ => 0, ‘hide_empty’ => 1, ‘use_desc_for_title’ => 1, ‘child_of’ => 0, ‘feed’ => ”, ‘feed_type’ => ”, ‘feed_image’ => ”, ‘exclude’ => ”, ‘exclude_tree’ => ”, ‘include’ => ”, ‘hierarchical’ => 1, … Read more

Show category post order ASC

EDIT When you decided to unaccept my answer and change your question in the comments to my answer I was already in bed. Please consider @kaiser comment next time when asking a question. For the purpose of my answer, here is your comment i am having problem.. actually i want to show order by alphabet … Read more

Style sub categories differently from its parent category

It will generate the structure as you have asked for. if (is_category()) { $this_category = get_category($cat); if (get_category_children($this_category->cat_ID) != “”) { echo ‘<div id=”catlist”><ul>’; $childcategories = get_categories(array( ‘orderyby’ => ‘name’, ‘hide_empty’ => false, ‘child_of’ => $this_category->cat_ID )); foreach($childcategories as $category) { echo ‘<li class=”sub-cat”>’; echo ‘<a href=”‘ . get_category_link( $category->term_id ) . ‘” title=”‘ . … Read more

How to retrieve posts from parent category, splitting them per children when displayed?

Calling WP_Query three times isn’t too good for performance, as it will make three queries to the database. The way you’re currently approaching this seems like the proper (and fastest) way in may opinion. However, you should be calling $category_posts->rewind_posts() after each while-loop to reset WP_Query‘s loop to the first post. Furthermore, your current way … Read more

How to show monthly archive posts?

Create a file date.php in your active theme and use below code, you may need to polish this code as per your requirement: <div id=”content” class=”post-archive<?php echo $content_class; ?>”> <?php if ( have_posts() ) : ?> <header class=”archive-header”> <h3 class=”archive-title”> <?php if ( is_day() ) : ?> <?php printf( __( ‘Daily Archives: %s’ ), ‘<span>’ … Read more

how do i set an image for a category in admin panel

Before questioning please search for the available resources. I’ve found two available plugins: Categories Images – WP Plugins WPCustom Category Image – WP Plugins I personally used the first one, and grabbed the necessary code from the plugin to implement my own version, and it worked perfectly.

in_category in index.php

The following code is working for me. I tied in a child theme of TwentyTwelve. Just copy and replace your index.php with the following and let me know (And don’t forget to change the category slug as per your database): <?php if( have_posts() ) : while( have_posts() ) : the_post(); if(in_category(‘aciform’)) { echo ‘<h2>’.get_the_title().'</h2>’; } … Read more

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