Taxonomy list names with lowercase

What you are doing seems odd. You are creating and retrieving an HTML string only to strip out the HTML. Try this: $terms = get_the_terms( $post->ID, ‘genre’ ); // var_dump($terms); $tnames = array(); if (!is_wp_error($terms) && !empty($terms)) { foreach ($terms as $t) { $tnames[] = strtolower($t->name); } $genre = implode(‘, ‘,$tnames); } // var_dump($terms); You … Read more

What can i do add title to ‘large’ image?

Check the Codex. the_post_thumbnail accepts two parameters, the second of which is $attr— “attributes”. the_post_thumbnail(‘full’,array(‘title’=>’yay! a title!’)); The Codex entry for the_post_thumbnail is not clear on what is and is not allowed as an “attribute” but it appears to depend on wp_get_attachment_image and by filters applied by that function. title does work though. I checked.

Don’t submit post if post title exists

Here’s a sample code to get you started – basically it intercepts the creation of a new post by the user-submitted posts plugin(well at least it tries to, but in general there shouldn’t be any other posts created during that request). If a post with that name already exists, we add the content as a … Read more

Insert Message before content of after title

You need to use ‘the_content‘ filter function add_before_content($content) { return ‘Before content area ‘.$content; } add_filter(‘the_content’, add_before_content); It will still be inside the content div. If you want it outside the div you have to edit related template files i.e. single.php or templates/content-single.php. It all depends on which pages you want to apply it.

How to I make my post title link to a custom field

I assume that the post title markup looks something like so: <h1><a href=”https://wordpress.stackexchange.com/questions/117332/<?php the_permalink(); ?>”><?php the_title(); ?></a></h1> You merely need to replace <?php the_permalink(); ?> with your post custom meta value: <?php $post_bookmark = get_post_meta( get_the_ID(), ‘post_bookmark_url’, true ); ?> <h1><a href=”https://wordpress.stackexchange.com/questions/117332/<?php echo $post_bookarmk; ?>”><?php the_title(); ?></a></h1> Other caveats: You’ll want to consider the context … Read more

how to remove the default title of Categories widget

There is a filter you can use to do this. (Kruti has even found it, but instead of using it, he modified core files…) $title = apply_filters(‘widget_title’, empty( $instance[‘title’] ) ? __( ‘Categories’ ) : $instance[‘title’], $instance, $this->id_base); So what you really need to do, is to add this to your functions.php: function my_repair_categories_empty_title($title, $instance, … Read more

Output menu title

This outputs the title of a menu using wp_get_nav_menu_object (and prepends to the Content). function pg_show_nav_menu_title ( $content ) { // ID of the menu you want $nav_menu_id = 14; //Get menu into an object $nav_menu_object = wp_get_nav_menu_object( $nav_menu_id ); //Get the name (title) $nav_menu_title = $nav_menu_object->name; //String to return as Content $content=”Nav menu title: … Read more

Create a list of posts with topic headdings

OK I got it working. Not sure if it is the best way but I thought I would add a reply anyway. Set up the information needed for the custom loop using $args = array As described in http://codex.wordpress.org/Class_Reference/WP_Query $args = array( ‘post_type’ => ‘product’, ‘meta_key’ => ‘wpcf-topic’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’, ‘posts_per_page’ … Read more

How to remove Title and CSS styling of title from particular page

The body_class() (see Codex) is a function that displays classes depending on the query. In other words: Depending on where you are, it outputs different classes. You can as well append your own – either directly as argument or with a filter: // Directly in your template <body <?php body_class( ‘your-custom-class-name’ ); ?>> Example for … Read more

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