Custom text for certain tags

Confusing but I think I have the gist of it… Yes, you’d have to write a bunch of if/elseif conditionals or a switch, or loop though an array of tag names. This would be a pretty high maintenance approach. Or you could go to wp-admin->Posts->Tags, fill out the description and use that. $post_tags = get_the_tags(); … Read more

Changing H1 to Normal Links

I’d change this: class=”‘ . esc_attr( $post->post_type ) . ‘-title entry-title” and make a special class for this usage. For example, make it: class=”fb-list” and then style it however you like in your style.css file: .fb-list { font-size: 16px; font-weight: bold; } I’d also change the <strong> tag to a <p> or <span> or something … Read more

Show all videos by tag name

Try this. Use for tag_id in get_posts. $tax_terms = get_terms(‘media_category’, ‘orderby=count&order=DESC&hide_empty=0’); foreach ( $tax_terms as $tax_term ) { $posts = get_posts(array( “meta_key” => ‘select’, “meta_value” => 1, “tag_id” => 5, “post_mime_type” => “video”, “taxonomy” => $tax_term->taxonomy, “term” => $tax_term->slug, “numberposts” => 100, “posts_per_page” => 100));

Removing a taxonomy term

Your issue is last argument in wp_set_object_terms() call. You are setting $append to true, so it essentially checks if input is already present and does nothing else. You want it set to false (which is also default) so that terms are forced to be same as input and difference (what you removed) is deleted from … Read more

Get Tag Slugs that start with a word

I think its easier to get them all and filter the ones starting with author: <?php $tags = get_terms( ‘tags’, array( ‘hide_empty’ => 0 )); if ( !empty( $tags ) && !is_wp_error( $tags ) ): ?> <ul> <?php foreach ( $tags as $tag ): ?> <?php if(strpos($tag->slug,’author-‘) !== false): ?> <li><?php echo $tag->name; ?></li> <?php … Read more

WordPress tags as twitter sharer URL hastags

get_the_tags() with a little bit of processing will do it: $tags = get_the_tags(); $tag_list = wp_list_pluck($tags,’name’); $tag_list = implode(‘,’,$tag_list); var_dump($tag_list); Reference: http://codex.wordpress.org/Function_Reference/wp_list_pluck

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)