category specific most used tags query

I ended up doing this using wp_tag_cloud. global $post; //Tag Cloud $cats = wp_get_post_categories( $post->ID ); $args = array( ‘category__in’ => $cats, ‘showposts’ => -1 ); $custom_query = new WP_Query($args ); if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { $all_tags[] = $tag->term_id; } } endwhile; endif; … Read more

How to add meta tags on password-protected homepage? [closed]

So from the point of view of your website Facebook is just like any other visitor. Either the content is hidden for everyone or it isn’t for everyone. Even if you’d try to detect Facebook and show them something different this punches a huge hole into your password-protection and makes it pretty much pointless as … Read more

tag is working in chrome but not in firefix..What is the problem? [closed]

First of all, this is not specifically related to WordPress. To answer your question, you need to convert the video in “ogg” format and add it to make it work on Firefox. Here is the code: <video autoplay=”” loop=”” id=”usbvideo” tabindex=”0″ class=”al-img100″> <source src=”https://wordpress.stackexchange.com/questions/285803/174125357.webm” type=”video/webm”> <source src=”174125357.mp4″ type=”video/mp4″> <source src=”174125357.ogg” type=”video/ogg> </video> There are tons … Read more

How to list all tags except the current tag in tag.php

You may try get_tags with exclude parameter. https://codex.wordpress.org/Function_Reference/get_tags get_queried_object_id get the tag ID from tag page. $tags = get_tags(array( ‘exclude’ => get_queried_object_id(), )); $tagList = array(); foreach($tags as $tag) { $tagList[] = ‘<a href=”‘.get_tag_link($tag->term_id).'”>’.$tag->name.'</a>’; } echo implode(‘, ‘, $tagList);

Code to check how many posts a tag has?

You can use the found_posts property of the WP_Query class, to get the total number of posts in the queried tag (post_tag taxonomy), provided that the no_found_rows argument is not true: global $wp_query; $total_posts = $wp_query->found_posts; Working example using the wp_robots filter to add noindex (and also follow) to the robots meta tag on single … Read more

Exclude Specific Tag On Homepage

This should work function exclude_posts( $query ) { if ( $query->is_home() ) { $query->set( ‘tag__not_in’, array( 13 ) ); } } add_action( ‘pre_get_posts’, ‘exclude_posts’ ); tag and tag_id are not set up like cat to accept negative numbers (ID numbers) for exclusion (conclusion based on experiments, not digging into the code (some other time, perhaps!)). … Read more

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