Echo title attribute php

Not exactly wordpress question, more of a php but – The syntax for echo is quit simple : You start with a quotation mark, and close with a quotation mark. But since INSIDE the HTML we also need quotation marks , we separate them by using the single ‘ for PHP and the double ” … Read more

Getting all ID’s matching a title in a custom post type

Just change the $args array to this: //Let’s say you’re searching the posts with the title ‘The searched post’: $pages = array(); $args1 = array( ‘s’ => ‘The searched post’, ‘post_type’ => ‘course-manager’, ‘posts_per_page’ => -1 ); query_posts( $args1 ); Your query_posts will return all the posts with the title alike ‘The searched post’.

Blog post not showing title

This happens because you have set the post format of that entry to link, and for that post format TwentyEleven does not show the post title: .format-link .entry-title { display: none; } Solution: Use another post format (standard for example) or another theme.

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