Home page of blog displays no posts

Create a page for you Blog. Just the title only nothing else. I use ‘Our Blog’ for instance. Save it and make it public. In your dashboard go to Settings|Reading Use the drop down menu for “Post Page” to find the page you just created. Scroll down and save the changes. Your blog page should … Read more

custom post type breadcrumb error when has_archive = false

Just grabbed a snippet from the get_cpt_crumb() function in the genesis breadcrumbs class file (/lib/classes/breadcrumb.php) protected function get_cpt_crumb() { $post_type = get_query_var( ‘post_type’ ); $post_type_object = get_post_type_object( $post_type ); if ( $cpt_archive_link = get_post_type_archive_link( $post_type ) ) $crumb = $this->get_breadcrumb_link( $cpt_archive_link, sprintf( __( ‘View all %s’, ‘genesis’ ), $post_type_object->labels->name ), $post_type_object->labels->name ); else $crumb = … Read more

Tag page that displays specific posts

Create tag.php & save it in your theme directory. This is a default behavior of wordpress. So you don’t have to struggle with it. <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); // Do your stuff here such as below the_title(); the_content(); endwhile; else: echo ‘No Post … 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

is action hook not working on quick edit?

According to WPSeek’s page on the create_{$taxonomy} action hook, and also the new-to-me WordPress Developers’ docs on the same hook, there are two required parameters: Parameters $term_id (int) (Required) Term ID. $tt_id (int) (Required) Term taxonomy ID. So your function is missing the $tt_id parameter.

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