How to get terms from a custom taxonomies after WordPress 4.5.0

OK, wild guess: $prefix_topic_terms= array(); if ( ! empty( $iva_topic_terms ) ) { vs $prefix_topic_terms = array(); if ( ! empty( $prefix_topic_terms ) ) { You’ve changed the variable that is checked for emptiness in the new code. That code will never query get_terms for that taxonomy, because $prefix_topic_terms will not be empty. The Error-object … Read more

Blogroll links sorted by category in a table

As suggested, here is the “arrayed” version: $args = array( ‘categorize’ => 1, ‘category_before’ => ”, ‘category_after’ => ‘</table>’, ‘title_before’ => ‘<h3>’, ‘title_after’ => ‘</h3><table><tr><th>Link</th><th>Description</th><tr>’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘before’ => ‘<tr><td>’, ‘after’ => ‘</td></tr>’, ‘between’ => ‘</td><td>’, ‘show_description’ => 1, ‘show_name’ => 1 ); wp_list_bookmarks( $args ); The Highlight of my answer … Read more

How can I completely hide a taxonomy term from “frontend”? [closed]

First what i see in your “latest FAIL” code you use wrong “operator” (or maybe is just typo). It sholuld work if you change “operator” to ‘operator’ => ‘NOT IN’ tax query parameters UPDATE: for Sablednah comment You can try to hide this term (and “count”) completely by modify WP_Term_Query with something like that: add_action(‘pre_get_terms’, … Read more

How to return newly added terms when using wp_set_object_terms

You can add a filter for a specific function call like so: add_filter( ‘set_object_terms’, ‘checkNewTerm’, 10, 6 ); function checkNewTerm( $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids ) { // Do stuff, ie. compare count of $tt_ids and $old_tt_ids } wp_set_object_terms($id, array($migrate_case), ‘pa_case’); remove_filter( ‘set_object_terms’, ‘checkNewTerm’, 10, 6 );

HTML in category name

Thanks all @ValentinGenev i choose this option, but i’m totally newbie so i Have to study WP much more in order to follow your lead. I found this in my theme (extras.php): if ( $child_theme_support == ‘default’ ) { $categories_list = get_the_category_list(esc_html__(‘, ‘, ‘blossom-fashion-pro’)); }else{ $categories_list = get_the_category_list(esc_html__(‘ ‘, ‘blossom-fashion-pro’)); } if ($categories_list) { echo … Read more

How to display only the direct children of a term on a taxonomy page

You have got the current term id by the following code $current_term_id = get_queried_object_id(); Getting all the info of chilldren of the parent, not grandchildren $termchildren = array( ‘hierarchical’ => 1, ‘show_option_none’ => ”, ‘hide_empty’ => 0, ‘parent’ => $current_term_id , ‘taxonomy’ => ‘Structure’ ); $subcats = get_categories($termchildren); // Display the children foreach ($subcats as … Read more

custom taxonomy terms archive page

It seems like Qaisar has answered your question with “have you flushed re-write rules?”. However, I would like to clarify that it is NOT essential to add a taxonomy.php unless for some reason you are querying specific posts on the archive.php that doesn’t include this taxonomy. The order of WordPress file execution can be seen … Read more

Different permissions for same type of post

The simplest way is to create two custom post types. One will be “news” and one will be “whats-new”. So for example, you could create a plugin in /wp-content/plugins/ called news-post-types.php. The code below will create special permissions that only apply to this post type: <?php /* Plugin Name: Post types and permissions for News … Read more

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