Questions tagged [the-tags]

The tag has no usage guidance.

0
votes
1answer
24 views

How to output get_tags array list to select box

I have a custom meta box. In it there are input fields, as well as a select box. What I want, is to have the get_tags array list to be outputted as the values in the select box. I currently have the ...
0
votes
1answer
46 views

Strip <a href=“” rel=“tag”></a> from the_tags() output

I want to show plain text tag names above each post on a page that displays posts for a given category. Each post only has one tag. I've set up an array to grab posts from the category I want and ...
0
votes
1answer
50 views

the_tags : can we insert a class

<?php the_tags( '<ul><li>', '</li><li>', '</li></ul>' ); ?> when we use the above we get this kind of HTML → <ul> <li><a href="http://..........
3
votes
4answers
1k views

How to display the_tags() as plain text

the_tags by default is displaying as URL. I need to display it as plain text to insert inside HTML attribute. <?php $tag = the_tags(''); ?> <div class="image-portfolio" data-section="&...
1
vote
2answers
419 views

Post tags show outside loop?

I'm trying to use tags of the single post, as meta keywords. I tried using this: <meta name="keywords" content="<?php the_tags('',',','');?>test<?php }?>"/> It works, but the ...
-1
votes
2answers
1k views

Trying to prepend a Hashtag symbol to the_tags links [closed]

I want to prepend a hashtag (#) in front of the tags on my post pages in Wordpress using jQuery. This code is not working: $('div.tags a').prepend('#'); This is the php: <div class="tags"> ...
-1
votes
3answers
1k views

Tags outside the loop

I want to display the tags of the posts in my main page. I used: global $post; the_tags(); But it's only showing up for my FIRST page.
0
votes
1answer
203 views

Display Tags of Child Pages

I'm trying to display tags of child pages on the parent page. In my functions.php: // add tag support to pages function tags_support_all() { register_taxonomy_for_object_type('post_tag', 'page'); } ...
0
votes
3answers
1k views

How to separate the tags?

Ok I have searched and can't find. Here is what I'm trying to accomplish. I want to separate the tags in my post. For example, I want to show the first tag in my post but have all other tags show ...
2
votes
1answer
2k views

the_tags() : display the tags by the order they are typed in in the backend, not alphabetically

I'm using WordPress' the_tags() to display the tags of each post on a single side. What I intend to do is to display the tags by the order they are typed in in the backend, and not by alphabetical ...
0
votes
1answer
3k views

Tags not working with custom post type

I just made a custom post type. How do I display the Tag on the my site same as what the Post post type has? I try this function but not work :- <?php the_tags(' ', ', ', ' '); ?> In panel, ...
0
votes
1answer
2k views

Include tags in the body of a post

it feel like this should be easy. I want to add the post tags inside the body of some posts. I was thinking that creating a shortcode may be the answer. I came across these 2 pieces of code: To ...
0
votes
2answers
2k views

Using has_tag() outside loop

I want to if the check next post has a specific tag. I tried the following code, but it is not working because has_tag() only works in the loop. I want to use it outside the loop. <?php if ( ...
1
vote
2answers
135 views

How to not show tags if the post doesn't have any?

I currently have the following trying to avoid showing tags (the icon in this case) when there aren't any, but the icon continues to show up. Any thoughts? <?php if ( is_singular() && ...
-1
votes
1answer
298 views

Show tags in post? Function not working

I'm using the first example from here: http://codex.wordpress.org/Function_Reference/get_the_tags but nothing is showing up. There's nothing about get_the_tags in my function.php... nor do I know ...
0
votes
1answer
77 views

the_tags only showing when logged in?

I'm trying to figure out why the_tags(); when used in the loop are only showing when I'm logged in to the site. I've never come across an issue like this before when developing themes. my code is ...