limit number of tags shown in tag.php

If you want to modify the main post query, use the pre_get_posts filter: add_action( ‘pre_get_posts’, ‘limit_tags_to_196_posts’ ); function limit_tags_to_196_posts( \WP_Query $query ) { // we only want tag archives if ( is_admin() || ! $query->is_main_query() || ! $query->is_tag() ) { return; } $query->set( ‘posts_per_page’, 196 ); } Notice that we check the query first, we … Read more

Random tag in the post

Someone already asked this question and can be found here: [https://stackoverflow.com/questions/17321603/how-to-display-a-list-of-random-tags-in-wordpress/22323541]Duplicate issue is resolved[1]

wp-cli error: “Term is missing a parent”

I recently tried to export the posts from a large WP site I inherited and faced the same issue. For some reason, there were terms (referenced via term_id) linked to other “parent” terms inside the “wp_term_taxonomy” table and these “parent” terms simply did not exist in the “wp_terms” table. So the simplest solution is to … Read more

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