Archive for June, 2011

To get post title

Posted: June 29, 2011 in WordPress

<?php

global $post;
$this_post_id = $post->ID;

$post_id = get_post($this_post_id, ARRAY_A);

echo $title = $post_id->post_title;
?> 


get_col($wpdb->prepare(”
SELECT ID
FROM $wpdb->posts
WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s
ORDER BY $wpdb->posts.post_title”,$first_char));

if ($postids) {
$args=array(
‘post__in’ => $postids,
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘caller_get_posts’=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
echo ‘List of Posts Titles beginning with the letter ‘. $first_char;
while ($my_query->have_posts()) : $my_query->the_post(); ?>

<a href="” rel=”bookmark” title=”Permanent Link to “>