update_user_meta updates to a wrong ID

That’s likely because you are using $current_user->ID, which always refers to the currently logged in user, or when “empty” object if not logged in (ID == 0). If you would like to update user meta on any other user you would have to supply the user ID of that user in the $_POST data as … Read more

Select default taxonomy on dropdown

This is the following new updated article_type function to make it work: I have removed selected attribute from none option and added selected attribute to that terms having news slug. // This function gets called in edit-form-advanced.php function article_type($post) { echo ‘<input type=”hidden” name=”taxonomy_noncename” id=”taxonomy_noncename” value=”‘ . wp_create_nonce( ‘taxonomy_type’ ) . ‘” />’; // Get … Read more

One taxonomy template for all categories?

I think it’s worth clarifying a bit of terminology first: Taxonomy – a set of related terms Term – an entry (I want to just say “term”) in a taxonomy Categories – a taxonomy that’s in the default WordPress Tags – a taxonomy that’s in the default WordPress Category – a term in the Categories … Read more

Custom image size doesn’t work

Your custom size will only show up as an option if the selected image exists at those dimensions. So, have you uploaded any images since adding the new image size to functions.php? If not, then you won’t see the vividflow option. You could always run regenerate thumbnails so bring your older images up to date.

reorder a WP_Query, using a dropdown

I guess the problem is $qry = new WP_Query(array(‘category_name’=>$GLOBALS[‘city’],’order’=>$orderby)); Let’s just say $orderby is orderby=title&order=ASC Then the order argument of WP_Query will be like this: ‘order’=>’orderby=title&order=ASC’ However, order argument only accepts: ASC and DESC. You should do somethings like this: WP_Query(‘category_name=”.$GLOBALS[“city’].’&’.$orderby);