I need to add new menu item inside the custom post admin menu
Check out the documentation on the function add_submenu_page You should be able to add as many links as you need given the parent post type.
Check out the documentation on the function add_submenu_page You should be able to add as many links as you need given the parent post type.
Go to Settings » Permalinks, and simply click on the Save Changes button. If Still, you face the same issue then, check your .htaccess file or IIS config file.
The selected parameter just defines which option is selected when the select field is rendered. it’s an optional parameter that defaults to the current category or 0 $defaults[‘selected’] = ( is_category() ) ? get_query_var( ‘cat’ ) : 0; (https://developer.wordpress.org/reference/functions/wp_dropdown_categories/) This function is for rendering a category drop down, but you can override it to work … Read more
As I said, this is doable, but we need to do careful planning as this is quite a heavy operation. On my test installation with a post count of just 13 posts, and 3 terms per taxonomy, the db is visited 20 times and the complete operation takes 0.03613 seconds. I have tried a couple … Read more
You can try this. $parent_terms = get_terms( array( ‘taxonomy’ => ‘post_tag’, ‘hide_empty’ => false, ) ); foreach ( $parent_terms as $terms) { $term = get_terms(array( ‘taxonomy’ => ‘post_tag’, ‘hide_empty’ => false, ‘parent’ => $terms->term_id ) ); foreach ($term as $term_child){ $string .= ‘<li><a href=”‘ . get_term_link( $term_child->term_id ) . ‘”>’ . $term_child->name . ‘</a></li>’; } … Read more
The code seems to be good to me, may be try to correct this line : echo ‘<li>’ . implode( ‘, ‘, $names ) . ‘<li>’; To : echo ‘<li>’ . implode( ‘, ‘, $names ) . ‘</li>’; You forget to close the li tag. Same thing here : echo ‘<li>’ . implode( ‘, ‘, … Read more
Look at the docs (please read the docs) for is_taxonomy_hierarchical(). You need to tell it which taxonomy you’re checking: if ( is_taxonomy_hierarchical( ‘my_taxonomy_name’ ) ) { } If you’re template isn’t specific to a taxonomy, and you need to know which taxonomy you’re viewing, use get_queried_object() to figure it out (you were already told how … Read more
I do not know how ACF works or how its data is stored, but in general, I would just use usort() to sort the returned array of terms via the ACF value of cognome_nome. Note that array_push is a bit expensive to use, so try to avoid that 😉 As I stated in comments, your … Read more
It seems you do not have a template for your custom taxonomy. I do not think so single.php will be used for this purpose. Have a look on this ARTICLE.. Look at the hierarchy,,, I think in your case you need taxonomy-soortpost.php Taxonomy hierarchy: taxonomy-{taxonomy}-{term}.php taxonomy-{taxonomy}.php tag-{slug}.php tag-{id}.php category-{slug}.php category-{ID}.php
Turns out there was a function hooking the filter list_terms_exclusions, and the return was inside a logically faulty conditional. I fixed it and now the term query exclusion works as intended.