How to add tags to identify custom post types in archives?

I got it 🙂 <?php if ( ‘articles’ == get_post_type() ) { ?> <div class=”post-type-articles-container pull-left post-tag-margin”><a href=”http://collectivelyconscious.net/articles”>Articles</a></div> <?php } ?> <?php if ( ‘questions’ == get_post_type() ) { ?> <div class=”post-type-questions-container pull-left post-tag-margin”><a href=”http://collectivelyconscious.net/questions”>Questions</a></div> <?php } ?> …etc.

How can I add meta tags in the WordPress header?

Since you are you using Yoast WordPress SEO plugin you can utilize its hook action wpseo_opengraph to add your custom meta tag property. Add the following code to your theme functions.php file: function wpse213_article_tag(){ global $post; if($post->post_type == ‘post’) { if($tags = get_the_tags($post->ID)) { foreach($tags as $tag) { echo ‘<meta property=”article:tag” content=”‘ . esc_attr($tag->name) . … Read more

How to export tag counts to excel?

Please note that this stack is more focused on development, asking for ready–made solutions like plugins isn’t considered in scope. From perspective of native functionality and power user perspective you can sort tags by count in WP admin interface. You can also tweak how many tags are displayed via Screen Options (top right of page). … Read more

How can i get tag without />?

Capture all the wp_head content add_action( ‘wp_head’, function(){ ob_start(); }, 0); Replace endings and output results add_action( ‘wp_head’, function(){ $head = ob_get_clean(); echo str_replace(‘/>’, ‘>’, $head); }, 99999);

Exclude specific tag or tags from related posts?

The Codex has almost exactly what you are asking: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘movie_genre’, ‘field’ => ‘slug’, ‘terms’ => array( ‘action’, ‘comedy’ ) ), array( ‘taxonomy’ => ‘actor’, ‘field’ => ‘id’, ‘terms’ => array( 103, 115, 206 ), ‘operator’ => ‘NOT IN’ ) ) … Read more

Listing tags with custom html output

I tested your code and it’s working. So you maybe have somewhere else an error. Try var_dump($tags); and see if there’s content. Did you created some tags and assigned them to posts?

Tags as autocomplete values

if(isset($_GET[‘get_tags’])): $output = array(); foreach(get_terms(‘post_tag’) as $key => $term): // filter by $_GET[‘q’] here if you need to, // for eg. if(strpos($term->name, $_GET[‘q’]) !== false)… $output[$key][‘value’] = $key; $output[$key][‘name’] = $term->name; endforeach; header(“Content-type: application/json”); echo json_encode($output); die(); endif; in this case your js would be something like: $(“#input_1_3”).autoSuggest( “http://yoursite.com/?get_tags=1”, {selectedItemProp: “name”, searchObjProps: “name”});