Questions tagged [tags]

The built-in taxonomy 'post_tag'.

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

Related post - don't know how to change the code

I'd like to display related post from the same category or by tag. I found this and try adopt to my solution /** * Related posts * * @global object $post * @param array $args * @return */ ...
0
votes
0answers
17 views

Show the tag if the custom field is set to “Yes”

Using the following code and shorcode, I display 10 tags in the basement of the site: function getTagListfoot($classes = '') { global $post; wp_tag_cloud( array( 'taxonomy' => 'tags_type', '...
0
votes
1answer
27 views

How to add Text before my Custom Term and hide it when empty

This is my code: <?php $terms = get_the_terms( $post->ID , 'this_is_custom' ); $links = []; foreach ( $terms as $term ) { $term_link = get_term_link( $term, '...
1
vote
0answers
9 views

CPT UI - elementor tags archive template not working

I've faced a situation with CPT UI and Elementor. I've created a CPT with categories and tags. But, when I tried to create a template for those tags (to dynamically redirect to my CPT posts associated ...
1
vote
1answer
38 views

Get current tag list in Gutenberg save function

I am trying to get the current tag list for a given post inside the save function to render on page. There is a similar Q here: How to return a list of custom taxonomy terms via the Gutenberg ...
0
votes
0answers
14 views

Add post title as a tag

How can I add post title to post tags? Example: Post title: post title Tag: before post title after wp_set_post_tags(4260, array ('befor','.get_the_title().','after'), true ); this function didn't ...
0
votes
0answers
18 views

Remove H1 site-tittle tag from product page with a function SEO

How to Remove H1 site-tittle tag from product page SEO. I only want the product-tittle tag in the H1 tag How can i do that with a function? https://www.jazzboekingsburo.nl/the-blueberries-james-bond-...
0
votes
0answers
32 views

Twentytwenty theme p-tags break em- and strong-tags that span several paragraphs

Going from twentysixteen to twentytwenty theme has disrupted formatting. As I understand WP2020 introduces p-tags within em- and strong- tags that are not closed. It looks like screenshot one. The ...
1
vote
2answers
31 views

Different templates for different category tags

Is there any method to create different template in a theme for different category tags search? For example, I have category 'blog' and category 'glossary' - there is no any similar tag for both ...
0
votes
1answer
8 views

Determine if term is Category or Tag

I am working on a piece of code for my plugin and I am trying to find the best way to pull Terms in to post object. The object will have the usual title, description etc. but it will also need ...
0
votes
0answers
9 views

Limit categories, tag count on back-end?

Before I re-invent the wheel. We are looking to limit the number of tags, or the number of categories that a specific blog article can be assigned to. I currently do this on the front end, similar to: ...
0
votes
0answers
27 views

Combining old and new 'tags

I have wordpress site that uses tags to represent the amount of workouts a client has been to. That number has become a competitive spark for my clients and they compete with each other. I am in the ...
1
vote
0answers
12 views

Site search needs to find posts for category topic AND Tag or keyword thats not in the post

So I have about 20 categories on the site, one of them is Press Releases. I've been asked to make sure that posts in the press release category only show up in that single category BUT can can also be ...
0
votes
0answers
8 views

Show ‘tags’ for a post on the frontend when in a list view

Show ‘tags’ for a post on the frontend when in a list view. When these are toggled on we will show #tag-name next to the categories of the post. See the screenshot provided as reference.
0
votes
1answer
9 views

How remove tags just have one post?

I have a auto feed website and there are too many unsueful tags that have just one or two post. Is there any sql code to clear all of these tags from database at once?!
0
votes
0answers
23 views

Display 10 popular tags of custom posts of curent custom taxonomy term

I want to display 10 popular tags in current taxonomy. ok i can display popular tags of total tags but i need to display tags (with post count) of custom posts of current custom taxonomy term. please ...
0
votes
0answers
16 views

Remove little gray box from content page

Hello! I would like to remove the 'em' element from the code using the 'additional CSS' function (or other way) since it appears on the main page has a little gray box. I have attached an image to ...
0
votes
1answer
29 views

How can I display tags as categories?

I'm using the "Pages with category and tag" plugin because my website uses individual long pages as posts. I would like to make a gallery of the past posts (sort of like an archive section), ...
0
votes
1answer
26 views

Checking if one of the post tags has options

I have some option in some of my wordpress tags and I'm trying to determine (in single.php) if one of those tags has options and if one of them (options) is equal to a specific value. This is what I ...
0
votes
0answers
6 views

Filtering get_terms so it displays tags by category

Is there a way to filter get_terms so it'll list only tags assigned to a post in a specific category? I have two categories on the site I'm building, Recipes and Nutrition and I would like to display ...
0
votes
0answers
15 views

Custom search bar - search in a specific category/tag field

I want improve on my website some search bars for search a specific post in only one category or tag. For example i have a page with 200 posts, eachone have one or more tags/catgeories: tag "x&...
0
votes
0answers
14 views

How to add Featured Image Alt tag ( wordpress Home page)

I want to set the first picture on the subject as the featured visual. and I added these codes to content.php. <?php if ( has_post_thumbnail() ) { the_post_thumbnail(‘large’); } else { echo ‘<...
0
votes
1answer
13 views

Get the publish date of the older post inside a tag

What would it be the best approach to get the publish date of the oldest post inside current tag?
1
vote
0answers
16 views

How can I create zip code search filter to link to specific agent(s) on same page?

I have a page on my site (https://eliterenetwork.com/member-roster/) that has a list of agents that are categorized by states they do business in. I'd like to create a search filter at the top of the ...
0
votes
1answer
32 views

Is it possible to have “two” sets of tags?

I have several Custom Category Taxonomies but what I am wondering is, if it's possible to have a second set of "tags"? I am using my tags for a very specific purpose (the naming of cities) ...
0
votes
3answers
53 views

Show the amount of posts in a tag in a specific category has

I am creating a page template in Wordpress that displays multiple tags that are in a particular category. I have this working, but now I want to have the number of posts within each tag that is ...
0
votes
0answers
12 views

How to Display Custom Formatted Blog Post with Provide tag name as attribute in Shortcode

I want to make Shortcode where if client pass the name of tag(available or added in blog posts) as attribute then it will show 2 blog post from that mentioned tag. as i cannot ask him to do all html ...
0
votes
0answers
20 views

Images and Links Not Working on Tag View

We frequently (almost always) use images and HTML links in our blog posts. When I go to Mysite.com/blog or click individually on any of the posts, all the images and links work correctly. If I click ...
0
votes
0answers
15 views

How to get all the tags only from taxonomies that contain the currently selected tag?

I've been trying to find a way to do this, but I don't see this mentioned anywhere or any examples of code coming even close to accomplishing this... so here is what I am trying to do - I have a ...
0
votes
1answer
16 views

How to edit the <body> Tags within the image file URLs?

At present, my image files appear within the following URL structure: www.example.com/wp-content/uploads/year/month/image-file-name.jpg These image files, contain the following Body Tag <body ...
0
votes
0answers
27 views

Editing Categories and Tags (esc_html__)

I'm trying to style my category and tags list. I'm using underscores.me theme to make my custom theme and I'm not sure how to insert classes in this function. Inserting the class in span tag is ...
0
votes
0answers
28 views

Filter on the_content doesn't update the content being searched via register_rest_route

I'm trying to get my custom REST route to include search results from a filtered the_content. I'm trying to automatically include the post tag names within each post's content, so that searching can ...
0
votes
0answers
11 views

Tags property fetch HTML tags

For an unknown reason, I am facing issue with Tags post property. For some reason, it fetching HTML properties along with tags. Any suggestion? Thanks Thanks
0
votes
0answers
32 views

Filter according to tag on category page

In my website I have a CPT called "Experiences". All the experiences that I have added are divided into custom categories (slug -> our_experiences ) such as "Outdoor" , "...
0
votes
0answers
21 views

Adding WordPress Tags to the searched fields in customized search query

I have a website where I need to be able to search for Posts based on title, tags, and content of custom fields. I've made the modifications below to my functions.php file. (Code for including the ...
0
votes
0answers
12 views

Filter posts by tags in a category

I need a little help. I made a page where I listed posts in a certain category. I'd like to filter this posts by tags. My question is how to get tags for each posts and how to write a code for the ...
0
votes
1answer
70 views

Wordpress admin display post type tags as checkbox

I used Wordpress ACF plugin to created a post type called resource, also I created two tag categories named resource-type and resource-topic, I can added in those tags in the post by the enter certain ...
0
votes
1answer
18 views

Randomizing wp_tag_cloud() in child theme

I'm trying to write a wordpress function code in my child theme that randomizes the words in the word cloud where previously it was alphabetized. The code Im using is below, which doesn't work. // ...
0
votes
1answer
25 views

See if a post has a specified tag

I'm trying to see if a post (thru id) has a specified tag if has_tag( $tag = 'Cat', $post = $post_id ) { $taganimal = "Cat"; } I tried this, but it just crashes the site . Got idea ...
0
votes
1answer
31 views

How to get an array with all categories and corresponding names?

I want to create a selector control in the Wordpress customizer with all the existing categories and for that I need an array with all the categories and their names. I need to get an array like this: ...
0
votes
1answer
246 views

Multiple Tag Filtering

I am writing a theme for Wordpress and I need a tag filter tool for posts, that can filter by multiple tags simultaneously, without a submit button, no checkboxes, no radio’s, and a show all posts ...
0
votes
0answers
21 views

Custom WP search not looking at page tags

So, i created a custom search using WP_Query and it is working as i need it to except for the fact that it does not seem to be searching in page tags (i have a custom plugin that allows me to add tags ...
0
votes
1answer
48 views

Count several post tags

This maybe should be posted on a php forum, but since it's WordPress related, I'm giving it a try here.. With this code, I'll get the total count of posts work a certain tag; $term = get_term_by('...
0
votes
1answer
29 views

get taxonomies from terms

I have two post types Documents News Items with categories for each post type, Documents -- PDF, Word, Excel News Items -- Articles, Releases BUT they share the same tags. Documents -- BOSS, EFF, ...
0
votes
0answers
15 views

how to change footer quick links menus(Primary menu) for certain pages

Need to change Footer quick links menu and footer tagline for certain pages only we have working on School site it have both higher secondary school pages and nursery school pages if we click the ...
0
votes
0answers
6 views

Create the tag page ONLY if the tag is associated to more than 5 articles

I want to write a plugin which prevents wordpress from creating an archive page (I mean that the url must not exist) for a tag which is used only on an article. This means I should modify: the ...
0
votes
2answers
49 views

Count how many posts have a specified tag AND category

I know how to count how many posts has a certain tag, or category For example: $term_slug = 'some-post-tag'; $term = get_term_by('slug', $term_slug, $post_tag); echo $term->count; BUT! Is there ...
0
votes
1answer
54 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
22 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
56 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
2 3 4 5
25