Questions tagged [tags]

The built-in taxonomy 'post_tag'.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Prefix Wordpress Taxonomy Tags With Hashtag Symbol Like Twitter

How can I add a hashtag symbol before each tag in my WordPress website? My intent is that WordPress tags like 'Apple' should get converted to #Apple' I am the owner/developer of the site https://...
0
votes
1answer
15 views

Wordpress get tags in “publish_post” hook

I want to get the selected tags using publish_post hook, while publishing the post. With below code, I can get only those tags which are already saved in the post. this will not work for new tags. ...
-1
votes
0answers
12 views

Related tags list to a wordpress tag page [on hold]

I have custom post type called "Question" with tags I would like a tag list that shows related tags on a tag page. For example when on the tag page for the tag "Technology", I would like a tag list ...
0
votes
2answers
27 views

Get tags name under custom taxonomy in wordpress

I want to get/show only available tags under custom taxonomy. Here's my code; $tax = $wp_query->get_queried_object(); // print current taxonomy $args = array( 'post_type' => 'types', // ...
0
votes
2answers
25 views

How to show only specific tag in wordpress loop

I am trying to get the loop to show only two tag that have the ID 53 and 52. the code without the "if is_tag( array( 53, 52 ) ){" works. I tried different thing but I can't get it to work. Thank you ...
0
votes
1answer
15 views

Get X post tags

How to properly get only e.g. 3 post tags? My current code: $post_tags = get_the_tags(); if (!empty($post_tags)) { foreach ($post_tags as $tag) { echo '<a href="' . get_tag_link($tag-&...
0
votes
0answers
12 views

Exclude specific product tags from related products in WooCommerce 3.7.0

I use the following command line to exclude specific tags products from related WooCommerce products: add_filter( 'woocommerce_get_related_product_tag_terms', 'remove_related_tags1' ); function ...
0
votes
0answers
22 views

Tag pages with regular editor

So, I am creating a website, review products and attach dozens of tags to them dependent on what the product entails. I have a custom review template for my products and based on what I tag the ...
0
votes
0answers
19 views

Custom taxonomy named 'tag' return 404 page

I registered a custom taxonomy named 'tag', code below: add_action('init', 'reg_custom_tag'); function reg_custom_tag() { register_taxonomy('tag', array('my_custom_post_type'), array( '...
0
votes
1answer
24 views

`<!--:en-->` Language notation in the post content

Can someone tell mich which plugin usually handles the following notations, used to translate posts? <!--:en-->english text<!--:--> <!--:es-->spanish text<!--:--> Any way to ...
0
votes
1answer
34 views

How to get all the available post tags using the WP Data Module?

This is my first time working with wordpress, and right now I'm working with a legacy code, migrating some plugins to be gutenberg ready. There's a plugin that gets all the available tags in the ...
0
votes
0answers
6 views

(JSON) Query posts B,C,D,E,F by tags in Post A

I'm using WP query generator to create a JSON code for a WP plug-in which call post titles. But, for now, i have to type manually tag1,tag2,tag3 related to the displayed post to call other posts. {"...
0
votes
0answers
18 views

How to replace wp_ajax_add_tag() error notice on create_term?

I am writing a plugin which uses natural language processing and knowledge graph technology to determine the true entity type of terms added to WordPress, with the purpose of tidying up taxonomies. ...
0
votes
0answers
15 views

Listing only matched result line if specific tag and category is matched

For my Campus Project, I am developing a Travel based website where Touring Spots will be achieved and nearby Hospital, Shopping Mall and Hotel names will be listed on the following touring spots post....
0
votes
1answer
18 views

How to put a before and after with tags in a wordpress entry?

I'm trying to make two "before" and "after" buttons on each wordpress entry, but with related articles by tags. I have this code, but it doesn't work because it doesn't show me the related articles by ...
0
votes
2answers
33 views

Display all product tags associated with a specific product category

I need some help writing a shortcode to display all product tags associated with a specific product category which can be displayed on any page. My problem is that I can display all product tags ...
0
votes
1answer
48 views

How replace individual <category> elements in the RSS feed with a single <category> string

We're sending RSS emails out to our list and would like to include the categories and tags. But when we add them, due to the way WordPress delivers them, they just end up in one big long string/...
0
votes
1answer
13 views

How to convert Post Object Custom Field into Tags

so I've used this script in from this post to automatically convert an existing custom field into a tag. The problem is that my custom field is a Post Object. SO, it is creating a tag with the post ID....
0
votes
0answers
14 views

Sort posts by number of times tagged [duplicate]

Let's say I have a custom post type Books, and I tag the books with a custom taxonomy "Person". The taxonomy contains the name of a person and basically means the person has read that particular book. ...
0
votes
1answer
11 views

My theme is adding an unmatched end tag and outputting it to my screen

I use a theme that uses WPBakery - I have a feeling WPBakery might be the culprit here. I made a few small changes, and now this is appearing at the very top of the page, above the menu: " /> I ...
2
votes
1answer
42 views

associate custom post type with tags with specific pages

I have various products (custom post type) which already have categories but I have now I have added this line to be able to add tags to the products. 'taxonomies' => array('post_tag') So, I ...
0
votes
0answers
144 views

Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_terms`

I have a wordpress site that has been working well for the past 6 years. Recently, I have been getting errors on: user creation tag creation I realized that user creation was yielding Duplicate ...
0
votes
0answers
5 views

RSS feed: How do I change the category node to show up as hashtags?

In the current RSS feed, for one of my posts it would show the category and post tags like this: <category><![CDATA[Music]]></category> <category><![CDATA[michael ...
0
votes
0answers
56 views

Unwanted word behind my title in SERP

Can anyone here help me about my title problem in google? My title in google result page do not exact match with my title tag. If you search with keyword "itclax furidacchi" in google, my title there ...
0
votes
0answers
13 views

Add user tag to corresponding custom posts

I use The events calendar plugin as a timetable for scheduling staff. Each event (custom post) represents a shift. Each event title (post title) is named after the particular employee of that shift (...
0
votes
1answer
54 views

How to show tag count for individual product post in wordpress woocommerce

I am using WordPress Woocommerce as a review platform rather than a eCommerce site. When a review is made, a pre-set arrangement of tags are able to be used for each individual product post. Currently ...
2
votes
1answer
21 views

WordPress tag cloud add more links

Due to location constraints, the Tag Cloud widget settings display 30 tags. Can I insert a custom link at the end of the tag cloud? So that I can link to a tag archive page. Thanks in advance!
0
votes
0answers
15 views

How to show text near a specific word/tag/category?

can someone give some examples of code that I can use in the tag and category loop pages, which will give out the content near a word? Here is an explanation. The default function of the category and ...
0
votes
0answers
15 views

Filter posts by tags, if they have have the same amount of matching tags, filter by date. WHAT?

I know basic WordPress development. I still get confused with what functions can be used outside of the loop and inside, blah blah. But for the most part, I can handle the basic development needs of a ...
0
votes
1answer
51 views

Fix wp_term_relationships slow query in get_posts

I used the Query Monitor plugin to find slow query on my WordPress site. The below-mentioned WP_Query->get_posts() takes about 0.3446 query time out of the total Database Query time of 0.3976. ...
0
votes
0answers
19 views

Code to insert TAG taxonomy Wordpress

I made a grave error. I delete many TAGs from the database of my blog. Many TAGs were orphaned. And yet, unfortunately, many posts have anchor words that link to deleted tags. That is, several links ...
0
votes
0answers
21 views

Remove status 'archived' from the default post and page view

I have some page status on my wordpress platform : All, mine, draft,published and ARCHIVED as you can see on the picture below When i go to pages, default view is on ALL pages a got 62 pages on my ...
0
votes
0answers
9 views

Wordpress page attributes on tag edit

I have it done for categorie but I need also the page attributes on te tag edit page and add tag page. How can I do this? See attachment.
1
vote
1answer
26 views

Sorting Tags by Slug Value

In wordpress the tags are display alphabetically by default. How can I sort the tags by slug value and keep that order in the front end?
0
votes
0answers
22 views

Can't figure out how to rewrite this URL : http://mysite/mypage.html?myVar[]=item1&myVar[]=item2

i explain what i try to do. First i have WP 5.2 and Php 7.2. i have a form which send a variable array like myVar[] to another page template. the url is http://mysite/mypage.html?myVar[]=item1&...
1
vote
1answer
85 views

Can paginate_links() be customized for a specific category or tag?

I am creating category and tag page templates for my client so they can post news articles to the news category page and specific news pages separated by tag with a pagination nav at the bottom of ...
0
votes
0answers
38 views

Sorting Tag Cloud by Popularity

So I have the default Wordpress Tag Cloud Widget on my sidebar/footer and I found the following code to limit the number that it's showing because it took up a ton of space. This code however is not ...
0
votes
1answer
40 views

Remove <figure> tag on my RSS Feed

I need to remove the tag that appears on my feed content ($content variable). http://mkt-d.hospedagemdesites.ws/wp/feed/ Is there an existing function to this task? Some tags appear with width ...
0
votes
1answer
16 views

How do I create a WP endpoint that retrieves all custom post types that have a tag?

I have a custom post type, let's call it 'capability'. Each capability can have one or more tags. I have a searchbox on the frontend that the user can type into to search for all capabilities that ...
0
votes
1answer
31 views

How to add a rest field to post tags?

I'm doing a headless wordpress, so using wordpress API. Using Yoast, I've added yoast SEO data to my post types API endpoints like this: function wp_api_encode_yoast($data, $post, $context) { $...
0
votes
1answer
26 views

Top tags with minimum number of posts

I'm getting the most used tags in the 1 day interval and everything works fine but how do I add the limitation to get tags with at least 5 posts and order them by counting? Actual code: $term_ids = $...
0
votes
2answers
47 views

How to search from specific post type with tags?

UPDATED: I have a Custom Post Type Commercials. This post type has a title and a video id. I want to search from this specific post type. Right now it returns result which matches the titles only, I ...
0
votes
2answers
29 views

Include future posts in tags and in search

I am using something like this to query and display future or scheduled posts on my homepage: <?php query_posts('post_status=future&posts_per_page=10&order=ASC'); while ( have_posts() ) : ...
0
votes
0answers
11 views

how to show all of post's “categories” that include a specfic tag for those posts

How to show all of post's "categories" that include a specific tag for those posts under those categories Thanks Mario
0
votes
1answer
29 views

List posts that don't have a specific tag?

I am trying to list posts that do NOT have specific tags. Currently, I am looping through each tag in a post, and if it's doesn't exist, list it. This works, except that it will list the same URL ...
0
votes
0answers
34 views

Can / should / how should I convert my Wordpress categories to tags?

My website uses Categories for work that I think belongs with tags. How, perhaps with the Better Search Replace plugin, can I convert all my Categories to corresponding tags?
0
votes
1answer
36 views

Insert text BEFORE the “tag” title

I'd like to insert text BEFORE the "tag" title. So, I am using Categories and Tags and I when I click into one of my "tag" archives the title of the page is simply the word of the "tag" so in my ...
-1
votes
1answer
37 views

SQL Query : how copy all tags of post into their post content in wordpress by sql query

I want to copy/move all tags of a post into posts content, as text form not in a link form. For example: A post has: a title in title field, some content in content field (like: a ...
-2
votes
2answers
77 views

how to loop through blog posts in php

I need help looping through a simple php code. What I'm trying to achieve is the following: Start Loop Look for all the posts Add the author first & last name as a tag (links to /tag/firstName-...
-1
votes
1answer
49 views

show limited tags in an article

I have a code that returns all the tags for the article. But that is not what I want, I only want to return the author name as the tag. <?php the_tags() ?></span> <br /> This will ...