Tags Sorted By Characters?

You can use wp_get_post_terms to achieve this. The third argument for this function supports an orderby parameter which defaults to name i.e. to sort alphabetically by name $args = array(‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘fields’ => ‘all’); // orderby also supports ‘count’, ‘slug’, ‘term_group’, ‘term_order’, and ‘term_id’ The first 2 arguments of that function … Read more

WP Query conflict on tag.php and category.php template

Just in case anyone happens to run into this same problem, my round-about solution for taxonomy template query conflict: clone the main query NULL the query define new WP_Query re-instate cloned query Tested and working in header.php <?php global $wp_query; $temp_query = clone $wp_query; global $post; $temp_post = clone $post; $wp_query = NULL; $wp_query = … Read more

Calling the first & last post by category in custom post type

It is sometimes irritating that some build-in functions don’t have appropriate filters to modify their output. get_boundary_post() is one of those build-in functions. Unfortunately it does not get posts according to post type, only taxonomy. You can still however make use of this function to get the first and last post. It does support the … Read more

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