WordPress category title not update in navigation menu

This issue occurred in WordPress core development. they give me answer on below ticket thread Date: Thu, 12 Sep 2019 15:36:49 -0400 Subject: [PATCH 1/2] Added special character decode to menu item title src/wp-includes/nav-menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php index f130d2f3e1..db8a2fcf78 100644 find this code on … Read more

Get permalink to latest post in category

The function you are using here, get_post() does not accept query arguments. So you have to use get_posts(). Try this: $latest_post = get_posts( array( ‘cat’ => 3, ‘posts_per_page’ => 1) ); if( !empty( $latest_post ) ) { echo ‘<a href= “‘ . get_permalink( $latest_post[0] ) . ‘”>Learn More Now</a>’; }

Related to genre and category

Your question is not very understandable…. I’ve never used this plugin, like most people here. It’s hard for us to help you, I think your question is too specific and you should contact the author of the plugin. If you find the solution to your problem, don’t hesitate to publish it here in response, it … Read more

error in specific category loop

Using query_posts is asking for trouble, because its results may be unpredictable (read more about that in this post). In stead you should define a new query and loop through its results. Like this: $args = array( ‘category_name’ => ‘news’, ‘posts_per_page’ => ‘3’ ); $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { … Read more

Get_term_meta() does not work with pre_get_posts()

I finally, finally figured it out! I was not able to get the category id in the first place. Strangely, get_query_var(‘cat’) is not working. Here is the way that worked for me, in case someone else also struggles with this: function my_new_category_order( $query ) { $category = get_queried_object(); $cat_id = $category->term_id; $post_order = get_term_meta($cat_id, ‘post-order’, … Read more