Monday, August 6, 2012

Custom page links without or with a list


$args = array(
'orderby' => 'post_title',
'order' => 'ASC',
'post_type' => 'page',
//'post_parent'=> '35',
'caller_get_posts' => 1
);

$pages = get_posts($args);
foreach($pages as $page) {
$out .= '<div class="bluecategory_wrapper">';
$out .= '<a href="'.get_permalink($page->ID).'" title="'.wptexturize($page->post_title).'">
<div class="bluecategory_left"></div><div class="bluecategory_bg">'.wptexturize($page->post_title).'</div>
<div class="bluecategory_right"></div></a></div>';
}
$out = $out;
echo $out;

No comments:

Post a Comment