Author template – separate custom post type by custom taxonomy term for $curauth

Got the answer, encase anyone else needs it, here it is. <?php $currauthor_id = get_the_author_meta(‘ID’); $terms = get_terms(‘your_taxonomy’, array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hide_empty’ => 1, ) ); foreach ( $terms as $term ) { $myquery = new WP_Query( array( ‘author’ => $currauthor_id, ‘post_type’ => ‘post_type_name’, ‘your_taxonomy’ => $term->slug, ‘posts_per_page’ = > -1, … Read more

Problem importing categories and sub-categories

You have error in your PHP. This array(‘parent’, $id_parent) will produce numeric array with two values – string parent and value of $id_parent. What you actually need is array( ‘parent’ => $id_parent ) which will produce correct associative array with one entry of key parent and value $id_parent.

Looping taxonomy in taxonomy?

In case anyone runs into trouble like I did, I figured it out! $taxonomy_1 = get_terms( ‘taxonomy_1’, $args_1 ); $taxonomy_2 = get_terms( ‘taxonomy_2’, $args_2 ); foreach( $taxonomy_1 as $tax_1 ) { foreach( $taxonomy_2 as $tax_2 ) { $posts = get_posts( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘ENTER-YOUR-CPT’, ‘order’ => ‘ASC’, ‘orderby’ => ‘title’, ‘taxonomy’ => … Read more

Add category description to list of category with taxonomy image

If I understand you correctly, you might try to replace echo ‘<div class=”grid col-780″><h4>In this issue</h4><p>[CATEGORY DESCRIPTION SHOULD GO HERE]</p></div>’; with: echo ‘<div class=”grid col-780″><h4>In this issue</h4><p>’. $term->description. ‘</p></div>’; i.e. $term->description to get the description part.

create taxonomy

Taxonomy.php is the default template that displays how custom taxonomies display in the browser. They aren’t how you create a new taxonomy. This is done by using the function register_taxonomy() in functions.php. WordPress has created a whole codex page on the topic available here. SmashingMag has a great tutorial on it as well (it’s actually … Read more

Delete Term via edit-tags.php

“<a class=”delete-tag” href=”” . wp_nonce_url( “edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id”, “delete-tag_’ . $tag->term_id ) . “‘>” . __( ‘Delete’ ) . “</a>”; $tag->term_id It’s exactly what it says, where did you define $tag? Also, I’m assuming $id is the $tag->term_id, so you might want to use $id instead.

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