Questions tagged [tags]

Tags are folksonomies for your entries, users, and assets.

Filter by
Sorted by
Tagged with
1 vote
1 answer
21 views

Entry query on field using the `and` parameter

I'm struggling to get a and entry query to work - it seems to be stuck on or. Query is {% set blogQ = blogQ.blogTags(['and', blogTag|join(",")]) %} where blogTag is [2291,2290] in this case. ...
  • 107
1 vote
1 answer
21 views

Add a tag to a user after EVENT_AFTER_COMPLETE_ORDER

I'm trying to add a tag to a user to match a product that they purchase. Following this answer I get a complaint that the tag already exists, so instead I was thinking I could just find the tag and ...
  • 347
1 vote
1 answer
43 views

Returning Metadata Fields with GraphQL?

I'm trying to pull as much information from the CMS as possible via the GraphQL API. I can't seem to find any info about how to extract the metadata information for the various entries in the CMS. At ...
  • 21
1 vote
1 answer
44 views

How do I search entries by multiple tags that are in different tag groups?

My search form has a drop down of tags from different tag groups. My current search code for the input query is {% set sentries = craft.entries({ search: query, ...
  • 1,900
0 votes
0 answers
34 views

How to set tags via graphQL?

I'm trying to create entries programmatically and setting tags on them. However, I can't figure out if this is possible or not, and can't find documentation explaining this. I'm basically trying to do ...
  • 213
1 vote
1 answer
50 views

Are categories first class citizens compared to tags?

I understand the difference between categories and tags. I am trying to choose between them as my taxonomy is not very deep and tags seem just as good as categories. But it occurs to me that ...
  • 1,900
1 vote
1 answer
63 views

How to add tags to an entry per site basis. And then only get the tags for that site in the frontend

I have craft pro and have one tagGroup called Tags Then I created a Tag field called newsTag like this: When I add a tag for german, the tag is also created in the database for dutch and english, so ...
0 votes
1 answer
48 views

Query only Tags wich are not connected to a revision

I wrote a query like this: $query = (new Query()) ->select('COUNT(elements.id) as count, tags.*') ->from('relations') ->join('INNER JOIN', 'tags', '{{relations}}....
  • 235
1 vote
2 answers
150 views

Frontend Form Search Users based on Tags

Context: I'm trying to build a search form that will filter users based on Name, Skills and School. Users who have any of the search criteria should appear in my results. Name Is a fuzzy keyword ...
  • 367
1 vote
2 answers
49 views

Display entries which share tags (2 or more)

I need to be able to display entries (within one section) that share keywords. I don't care what the keywords are, just want to display the entries based on 2 or more shared keywords. Anyone know how ...
1 vote
1 answer
27 views

Building my first Sprout Form and need ability to add Tags input

I'm building my first Sprout Form and I need a tags relational field, but where the user filling in the form can add their own tags, but if similar/matching tags exist then they can select them, like ...
1 vote
1 answer
95 views

How do I add an H2 tag to a page?

How do I add an H2 tag to a page? The site already runs many months now. All pages are okay but some are lacking an h2 tag. Is there a simple way to add an h2 tag to these pages?
  • 31
1 vote
1 answer
254 views

Fetch Entries with Tags Only

I'm trying to get all the entries which have tags associated with them. At the moment I'm doing: $entries = Entry::find()->with('tags')->all(); and then filtering the results in PHP as ...
  • 123
1 vote
1 answer
206 views

Display entries by tag

I've read through the docs but can't figure out what I'm doing wrong here: I'd like to display a list of entries by tag, where the tag is in segment 2 of the url. Here's what I've tried and is not ...
1 vote
2 answers
459 views

Craft Query by Category and Tag

I am trying to find the last four Channel entries (Named: Post) with a Category relatedTo "Support" (id: 458) AND Tag relatedTo: "Widget1" (id: 469) I've had success using Category or Tag but not both:...
  • 85
1 vote
0 answers
73 views

get tags related to entry

I'm working on Craft plugin which should find entries with special tags. In my action I have a string: $entries = Entry::find()->section('Projects')->type(['Projects']); and it returns all ...
1 vote
1 answer
265 views

Filter entries by tags

Still very new to Craft but just can't figure this problem out, it's a level above me at the moment. I have an FAQ page as a 'single' that I would like to display all entries from a channel by ...
  • 132
1 vote
1 answer
485 views

Product Filtering with Tags

I've built a product filtering system using tags and currently have 2 available tag groups under different fields. Size and Type Currently if I select 1 tag from both size and type, it shows all ...
  • 407
0 votes
1 answer
102 views

How to add tags in craft CMS 3

This is my first template that im working on in craft cms3, i've managed to make the most of the homepage and other tabs of website dynamic using the CMS, but I can't figure out how do I make tags and ...
  • 35
1 vote
2 answers
223 views

Filtering by categories AND tags with full match

We're trying to filter by categories AND tags in the one form. However can't seem to get things working as we would like. Essentially, we have a form that pulls in the tags and allows multiple ...
  • 21
6 votes
2 answers
888 views

How to delete tags in Craft CMS 3

I want to delete some of the tags that are entered in the system. Since there is no way to do that in Control Panel, and there is not a valid plugin that can do this (know that from my previous ...
2 votes
2 answers
423 views

Still not able to manage tags in Craft 3?

I have page where I display some items and there are filters by tag. So I make a list of all tags that are created. Then when the user click on some of the tag, he see only the product with that tag. ...
1 vote
1 answer
15 views

Editing a tag not reflecting on all records.. kindof

We have hundreds of entries with the improperly spelled tag "accessibilty" (the third i is missing). A search for "accessibility" will not find them (spelled correctly). I edited the tag on a record ...
2 votes
2 answers
428 views

How do I hide tags in a category that have no entries?

Entries can have one of two categories and one tag. (People = entries | program = categories | year = tag) On the pages I'd like to display entries related to the category and grouped by tag. ...
2 votes
1 answer
250 views

Add Tags to a Newly Created Entry With PHP in Craft 3

I am able to successfully create new entries with PHP when I am using basic field values that are Rich Text or Plain Text fields, but am unsure how to add Tags to an entry. So my entry already has a ...
3 votes
1 answer
244 views

Where are tags stored in the database?

Seeing as there currently isn't a way of deleting / managing tags in Craft3, I was wondering if someone could point me to where in the database these tags are stored so I can delete them manually. ...
  • 63
0 votes
1 answer
42 views

My `for` loop has fallen...and it can't get up

I want my <ul> to show a single tag representing all "active" entries ( "active" using a custom lightswitch field in the entry: fellowStatus. Each tag is a year (e.g. 2014, 2010, etc) E.g. if ...
1 vote
1 answer
698 views

SEO titles/descriptions for tags and archive pages

I have a blog setup with a Categories, Archive and Tags. In my _layout template I've been using the following to pull in SEO titles from fields, or Page/Category Titles is that's not been defined. {%...
  • 889
1 vote
1 answer
82 views

Ajax - Create tag with custom ID programatically

I'm trying to create an jQuery/Ajax script to import data from a Wordpress API service and want to import the WP tags into my database. Everything works as expected when I loop through the data and ...
  • 154
1 vote
1 answer
428 views

How can I add programmatically a Tag after SAVE_ON event in case of Assets types

We have to update the Asset after the SAVE_ON event, and the Craft::$app->elements->saveElement($asset); Not seems to be working (it is getting timed out). So what is the best pratice to ...
1 vote
1 answer
574 views

Get Entries That Match ALL of the tags specified

I have a search page where a user can check about 20 different checkboxes, where these checkboxes all relate to tags I have set up inside of Craft. I would like to perform the following search query: ...
1 vote
2 answers
680 views

Help with tags input field on a front-end entry form

I need to make a "keywords" field on a front-end entry form that can create tags in the cms (Craft 2). I am fully aware of existing tickets regarding this issue like Brandon Kelly's but they're a ...
  • 1,932
1 vote
1 answer
153 views

Tag Localization: how to create a tag without translation fallback version?

I'm dealing with tag localization on an English/Spanish site and have figured out that if I create a new tag, both En and Es elements are created by default, which would be O.K. if I never had to ...
1 vote
2 answers
131 views

Save an entry with tags

I have a project that the user choose a tag (tags are already created) and save the information. I try save a entry which has a tag field, all the stuff saves, but the tags don't. I try search ...
2 votes
1 answer
87 views

Multiple Tag Groups/Sets for separate channels

I have two separate channel types, let's say "News" and "Reviews" and each of those can have tags. Is it possible to have separate tags for each of those? So News has it's own set of tags, that can't ...
  • 145
1 vote
1 answer
56 views

Search for non-existing tags shows all entries

I have 3 groups of tags that redirect to the same template. tags/index.html. All the routing and linking those tags to their group page works well. <a href="{{ siteUrl }}taggroup/{{ tag.slug }}" ...
1 vote
1 answer
82 views

Trying to set a default asset folder using Craft tags

I'm trying to set a default asset folder for a field, as per the Craft docs on Dynamic Subfolder Paths. I'm trying to set the asset path for each blog article to be /our-journal/{date}/{slug}, where ...
4 votes
1 answer
115 views

Sort entries by best match to multiple categories

I've got a channel where entries will be tagged with multiple categories. I want to use those categories to show related content for each entry. So if an entry has cat_a, cat_b and cat_c, I want to ...
1 vote
1 answer
327 views

How to get a proper tag Url

I use the code "Link to the Tag URLs" from the following article: https://craftcms.com/support/tag-urls {% if entry.tags | length %} <h3>This entry is tagged with:</h3> <ul> {% ...
  • 196
3 votes
1 answer
138 views

Difference between {% includeCssFile %} or including it with <link>

I go a simple question. I wanted to start with building my craft template from html and changed all css and tags to to equivalent {% includeCssFile %} or {% includeJsFile %}. The page was working ...
  • 133
1 vote
1 answer
293 views

Get random entry tagged with

Looking to get a random entry from my database which is tagged with 'featured', is this possible at all? I've seen randomised by just the entry loop but nothing else.
  • 1,230
1 vote
1 answer
53 views

Craft ordering tags by 'name'

I've got a problem with some tasks. Craft tells me 'Deleting Stale Template Caches Failed' multiple times. When I look in the Deprecated Warnings, it tells me two things: Ordering tags by ‘name’ has ...
  • 287
1 vote
1 answer
380 views

How do I retrieve tags and tag data for an entry in Element API?

In Element API v1, I am setting up an endpoint that is trying to expose a news entry including the tags (title, id, slug) associated with it. Thought it could be set up similarly to how you can ...
  • 135
1 vote
1 answer
101 views

How do I add the Categories and tags related to each entry?

This is my basic entry layout and I just want to display the linked category and tag names as indicated… <div class="posts sidemeta"> {% for entry in craft.entries.section('news').find() %} <...
1 vote
1 answer
98 views

Is it possible to allow a user choose tags in admin panel using checkboxes?

The system I'm building requires a flexible taxonomy, where users should be able to add new taxonomy stuff to entries really easy and freely as soon as the need arises. So tags seem to work best for ...
1 vote
1 answer
165 views

How do I get tags to only display on posts that have that tag?

I’m trying to add tags to my blog posts. I’ve created a tags group with the handle ‘default’. In Setting/Fields I’ve got a field called bodyElements which is setup as a matrix, and within ...
  • 11
1 vote
0 answers
69 views

Plugins for Tags

Is there any plugin for Tag that will be like: Text field in a front-end entry form where user can add multiple tags. After pressing the save button, the plugin should: check for every tag, whether ...
4 votes
2 answers
343 views

Most related articles

I am using the normal relatedTo property to find related articles, but I have an issue which is: craft.entries.section('section').relatedTo("tags").id('not ' ~ entry.id).limit(3) Lets say THIS ...
  • 328
2 votes
1 answer
239 views

List entries without specific tag

I am trying to output a list of entries from a channel section that DO NOT have a certain tag. I am able to output the entries that have the tag assigned by setting the tag as a variable and using ...
  • 317
2 votes
1 answer
44 views

When posting entries, how do I post tags as well as the title and url?

I'm trying to create a post where in the entry loop I can also post tags. <a href="URL">TITLE</a> TAGS But in my current understanding there's no way to get the post's tags where I'd ...