post_title / the_title help needed post_title / the_title help needed wordpress wordpress

post_title / the_title help needed


to echo the title of a singular wordpress page, you do this wordpress function

<?php the_title() ?>

you can also surround it with some html for css formatting like follows->

<h2><?php the_title() ?></h2>

good luck


according to the Codex : http://codex.wordpress.org/Function_Reference/get_pages

"post_name" is not an argument for get_pages, it's a possible value for "sort_column".

Try the following:

<?phpglobal $post;$blockwho = get_option('good_blockwho');$page = get_page_by_title($blockwho);$myposts = get_posts('post_type=page&p='$page->ID);foreach($myposts as $post) :setup_postdata($post);?>    <?php the_title(); ?><?php endforeach; ?>


<?php     $blockwho = get_option('good_blockwho');     $homeblockwho = get_pages ('post_name='.$blockwho); ?><?php foreach ($homeblockwho as $hbw) {        $content = $hbw->post_content;     $title = $hbw->post_title;     apply_filters('the_content', $content);     echo "<h2><span>".$homeblockwho ->post_title."</span></h2>";     echo "".do_shortcode($content)."";}?>