Questions tagged [tags]

The built-in taxonomy 'post_tag'.

Filter by
Sorted by
Tagged with
0
votes
1answer
7 views

edit_tag_form_fields is depricated but tag_edit_form_fields doesn't work

I need to create, retrieve, update and display a custom field in Wordpress tags. This code works for displaying the custom field, but its deprecated. function tag_edit_form_fields ( $term ) { ?> ...
0
votes
0answers
11 views

Display related posts based on matching the category and a tag within a custom taxonomy group

Hi community and thanks in advance. My aim, I simply want to display Pubs/Bars related by the same area tag, automatically, on every post. I found and followed what looked like an excellent solution ...
0
votes
1answer
15 views

The Difference Between Categories and Tags and Taxonomies and Terms

I've got a custom post type 'articles' and I've added a custom taxonomy 'articles_categories' which has its own terms. I was under the impression you can't have categories and tags on custom post ...
1
vote
0answers
9 views

Disable stored tags queries in admin page when posting a new post

First of all, I am sorry because I am a bit newbie here and I am still learning forgive me, please. I have a Wordpress website blog and I have a very big database of tags stored in MySQL the problem ...
0
votes
0answers
12 views

Should I use 'tag', 'cat' and 'tax_query' parameters together in a WP_Query?

What I'm building I'm developping a plugin. I'm currently filtering the posts by tags and categories (tag and category_name WP_Query parameters) with values given in a shortcode. I want to add the ...
0
votes
0answers
14 views

call difrent post not last post

Hi i want to select different post in home page. homepage / index.php it shows all last post and from same movie (series). I want to show movie different way as I cannot see two post from same ...
0
votes
1answer
33 views

Redirect wordpress search query if its a tag

i have modified this function to make it redirect search query if it a tag example if searchQuery='football' then redirect to /tag/football/ function redir_search($a) { if (is_search()) { ...
0
votes
1answer
14 views

Get posts that match defined arrays of tags

I've been scratching my head a lot and couldn't find a reasonable solution that would not require multiple queries. In my case, the posts have multiple tags, but they can be divided into to "sets" ...
0
votes
1answer
17 views

WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)

This is really confusing me. I've tried numerous things but cannot get appropriate results. Here's what I currently have for my query: $args = array( 'post_type' => 'product', 'tax_query'...
1
vote
1answer
24 views

mystery tags which I didn't add - vulnerability?

I recently looked at the tags for my WP site and saw dozens of tags which I didn't add, and which seemed unrelated to any posts I've ever made. Many of them looked like random dictionary words. A ...
0
votes
2answers
21 views

Retrieving Tag Name in Template Part from Filtered URL

WooCommerce has a built in product_tag url filter as such: https://my-url.com/my-page/?product_tag=my-slug Bringing back all the product_tags with the given slug in the url. I am trying to do ...
0
votes
0answers
11 views

How to create tags automatically based on category and location?

hope you are all doing good, as i am running listing site on wordpress, so the creation of tags manually would be tedious as I have a lot of categories and locations (taxonomy), so need to automate ...
-1
votes
1answer
18 views

Change background image based on tags

I'm in a great need for little php script help. My dyslexia makes me dependent on already written scripts and help from others. I've found a site that has a short script that changes the background ...
0
votes
0answers
10 views

WordPress: SQL query to set TAG or CATEGORY if 1 or more words are written in post_title

SQL I need to set the TAG or CATEGORY in a post if there is a keyword in the post_title. Eg: IF "abc" word in post_title THEN set post TAG to "zzz" or IF "abc" word in post_title THEN set post ...
0
votes
0answers
16 views

Spinner doesn't go away on saving new Category/Tag, although request returns status OK (200)

I am building a new wordpress theme. I noticed when I create a new category/tag and hit add category/tag button in wp-admin. The spinner doesn't go away and it keeps rotating. I have checked in ...
0
votes
1answer
18 views

How to get post with associated categories and tags names instead of ids with rest api?

When i retrieve a post from rest api i have the following response : { "id": 2598, "date": "2018-10-15T06:20:10", "modified": "2019-05-16T23:35:50", "slug": "lorem-ipsum-dolor-sit-...
0
votes
1answer
45 views

how to display posts content on the custom css popup by clicking on each title on the sidebar?

I want to display post titles based on post_tag from default post_type concat with post_category from another post_type named 'update' on the sidebar. And finally When users click on each title it ...
1
vote
0answers
20 views

Force Balance Tags not working

I am trying to shorten my the_content() word count to 200 while retaining the html formatting as well as the shortcodes. I am pretty close but for some reason, I cannot get force balance tags or ...
0
votes
1answer
16 views

exclude product with available tag

I have classic WP_Querry: $products = new WP_Query( $args ); with $args = [ 'post_type' => 'product', 'posts_per_page' => 500, 'product_cat' => 'cars', ]; If I want products ...
1
vote
1answer
31 views

Do not change the order of the tags in the editor

I have a list posts by tag, but the relation is not relevant because first look for the posts with the first tags stored alphabetically, and not the first main tag, that is to say for me the order of ...
0
votes
0answers
20 views

Diplay product tags in shop page after each product name

I'm looking for a solution to add, in the shop page, for each product the according product tags. I intend to do this using a hook and place the product tags in the product_title_end location. I'll ...
0
votes
0answers
25 views

How do I display a tag cloud to only show tags specific to the article page?

I have article pages that are related to a handful of tags, but what I want to achieve is having the tag cloud only show the tags that are related to the current page. For instance, normally the tag ...
0
votes
1answer
16 views

Display text if title in archive has specific word

In tag pages, I want to display specific text if the title containing a specific word. As example: I have a Tag and tag archive page: Yellow Banana And I want to display “cool fruits” in all tag ...
0
votes
1answer
32 views

How to set “section categories”?

I've made a custom post type "Artwork" with CPT UI. In the settings of my CPT, I enabled access to these taxonomies "Categories" and "Section Categories". When I view my post list, I not only see a ...
0
votes
0answers
45 views

Best practice: Many hierarchical vs. few non-hierarchical taxonomies

I'm building a site that will eventually host thousands of posts, all from the same custom post type "Artwork". Each blog post has multiple custom taxonomy terms assigned, e.g. "Artist", "Project", "...
0
votes
1answer
52 views

Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1

I have a custom post type for 'news' which contains a 'news-tags' taxonomy. And another post type 'practices' which are tagged in news items. When I update any post of the 'practices' type, all tags ...
0
votes
0answers
7 views

404 on archive page with category and tag in url

Any archive page with a category and a tag returns a 404, for example: https://lespetitsproducteurs.be/categorie/recettes/etiquette/amande/ While archive page with category only works fine: https://...
0
votes
0answers
17 views

How to show post by tag inside content-summary.php?

I use standard template content-summary.php in total. I try to show here but no result. i can show post by tag using wp-query but it is repeat for the same number of post present in my category. so ...
0
votes
1answer
27 views

Need to remove a particular tag from published single post pages

Single posts show tag or tags after content on my website. I need to remove a particular tag making it hidden from the page. Actually I have redirected a link to this so cannot delete. I googled but ...
1
vote
2answers
20 views

How do I style Wordpress pages differently based on the tag used?

I was thinking this might be done by adding custom CSS to a page template. I have a page template like this: <?php /* * Template Name: Grafy Full Width */ /*add_filter('...
0
votes
0answers
8 views

Restriction tag and custom tag creation for author

Site has multi-author, so author has not right for "new tag" and "custom taxonomy tag (regions)" I had added this code and work for tag but how to stop custom regions tag by author. Pls guide ...
0
votes
0answers
27 views

How do I use the same Tag slug for different Tags?

I want to use the same Tag slug for different Tags. My URL structure will be unique basing on the category, but post_name and post_tag may happen to be duplicate in some cases. I need this for good ...
0
votes
1answer
31 views

How to test if the tag list is empty for the current page?

I have three custom taxonomies (topic, name, simile) Currently I display the list of tags in each taxonomy for the current post at the bottom of the post. That works fine. But I would like to give ...
1
vote
2answers
21 views

Don't show a tag on a post if it is the only post with that tag

At the bottom of a post, I show all that tags that post has. If the current post is the only post with tag X, then I don't want tag X to show in the list. Because if someone clicks on that, they'll ...
1
vote
1answer
29 views

How to make tag post listing page working?

I'm adding tags to posts. Clicking a tag takes you to an overview listing of all posts for that tag. I created this listing by adding template "tag.php", which includes: $tag = get_queried_object(); ...
0
votes
1answer
56 views

Allow user only create specific tags

I am using an editorial wordpress theme that has a frontend post editor for a user (contributor) to create a post. The editor is giving permission to the user to choose category for the article and to ...
1
vote
0answers
13 views

I can 't display product images based on the label

The task is as follows. We have a product card template in Elementor, we have products with tags. The task is to use the Portfolio tool to display images of products that belong to the same label as ...
0
votes
0answers
58 views

Tag appears empty when using API

I am able to query that the tag exists using: .com/wp-json/wp/v2/tags?slug= and in the response I see a link to: .com/tag/ and when I go to that link I see all of the posts with that tag. However when ...
1
vote
0answers
45 views

Force Contributors to add Tags via edit-tags.php

I need to be able to stop contributors to the website from adding new Tags when they create or edit a Post in WP. The reason is that I need them to enter an additional field at the same time which I ...
1
vote
0answers
13 views

I want to add a new tag to Wordpress URL permastruct

I installed a TV SHOW plugin on my WordPress install. URLs are like this: https://www.mywebsite.com/tv-show/title-of-tvshow Now I would like to add a specific tag to redirect the user to the right ...
0
votes
1answer
61 views

CPT tags not showing when editing post

Since Gutenberg I've used the plugin "Classic Editor" for one of my websites until I have time to make the necessary adjustments to fully work with the new Gutenberg look. I'm now starting to look at ...
0
votes
1answer
42 views

Replace <p>-tag in the_excerpt

I want to replace the -tag around the_excerpt. Right now html-output looks like this: <p> ...content of the excerpt... </p> I want to achieve this: <h2> ...content of the excerpt......
0
votes
0answers
17 views

How to prevent tag “iframe” from being deleted from the heading description of rubric?

I can’t insert html tag "iframe" in the description of the rubric/categories. The tag is deleted along with the content. How to prevent tag "iframe" from being deleted from the heading description?
0
votes
0answers
87 views

Pagination is not working properly in Product Category/Tag pages

I have a store with several products. Pagination works fine on the main shop page. But when I open a separate product category or product tag pages, in some of them pagination not working as expected....
0
votes
1answer
25 views

Echo text using is_tag

I've been trying to echo some text to all single pages that are part of tag_ID 129 This is the code that I used <?php if ( is_tag( '129' )){ echo '<p> test 2</p>'; } ?> so ...
0
votes
0answers
60 views

Filter post by tag

Iive found the next example to make filters on my site by tag: https://www.bobz.co/ajax-filter-posts-tag#comment-28112 But is working not like i spected... I've added on my functions.php: function ...
0
votes
2answers
28 views

Hide specific category tag on single post page

I have a category called "Featured", but I don't want this category tag to be shown at the bottom of single post pages. I do want to display the other category tags. How do I hide the tag for this one ...
0
votes
1answer
19 views

Suddenly extra hex string in <script> tags

By accident I saw that a hex string is added to all <script> tags. Example: <script src='https://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp' type="...
1
vote
1answer
32 views

Wordpress editor: “pick from existing tags” is gone?

In the olden days of Wordpress, I could compose a new post and pick from existing tags using the "Tags" section in the right sidebar. With the current editor, that "Tags" section still lets me enter ...
0
votes
0answers
35 views

Filtering posts in category by tag URL

I'm still learning WP, so this might seem pretty obvious to veterans. I've been given admin rights to a WordPress site and told to replicate what my predecessor did with a specific pair of pages. ...

1
2 3 4 5
25