How to easily create a product selector that filter by category and tags?
How to easily create a product selector that filter by category and tags?
How to easily create a product selector that filter by category and tags?
Suggested meta tags when publishing a post
Problems with tags
How do I stop automatic tag creation when a post contains the # character?
try this add_filter( ‘the_content’, ‘remove_paragraphs_inside_blockquotes’, 9 ); function remove_paragraphs_inside_blockquotes( $content ) { $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML(‘<?xml encoding=”utf-8″ ?>’ . $content, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED); libxml_clear_errors(); $blockquotes = $dom->getElementsByTagName(‘blockquote’); foreach ( $blockquotes as $blockquote ) { foreach ( $blockquote->childNodes as $child ) { if ( $child->nodeName === ‘p’ ) { while ( $child->firstChild ) { … Read more
I already had this challenge before and here is my personal solution for you: 1. For the tag cloud widget you can use this approach: add_filter(‘wp_tag_cloud’, ‘add_nofollow_to_tag_cloud’); function add_nofollow_to_tag_cloud($content) { // Add ‘nofollow’ to the links $content = str_replace(‘<a href=”‘, ‘<a rel=”nofollow” href=”‘, $content); return $content; } I already tested this locally and it works … Read more
WordPress tag hyperlink creation in the content when a post is saved
search behaviour in wp to only search by post tags and not return results for titles or content if the tag is not found. You can achieve this by customizing the search query using functions.php function custom_search_filter($query) { // Check if it’s the main query and it’s a search query if ($query->is_main_query() && $query->is_search()) { … Read more
wp_tag_cloud: list only general tags associated with a custom taxonomy tag
Use this- function custom_tag_archive_query( $query ) { if ( is_tag() && $query->is_main_query() && !is_admin() ) { $tag = get_queried_object(); $tag_name = $tag->name; $similar_names = get_term_meta( $tag->term_id, ‘similar_names’, true ); $similar_names_array = explode( ‘,’, $similar_names ); $similar_names_array = array_map( ‘trim’, $similar_names_array ); $similar_names_array[] = $tag_name; // include the tag name itself in the search terms $meta_query … Read more