Linkable headers
-
I am using the following code in my sidebar:
`<?php
global $wp_query;
if( empty($wp_query->post->post_parent) ) {
$parent = $wp_query->post->ID;
$parent_title = $wp_query->post->post_title;
} else {
$parent = $wp_query->post->post_parent;
$parent_title = $wpdb->get_var(“SELECT post_title FROM $wpdb->posts WHERE ID = $parent”);
}
?>
<h2><?php echo apply_filters(‘the_title’, $parent_title); ?></h2>- <?php wp_list_pages(“title_li=&child_of=$parent”); ?>
‘
Is there a way to make <h2></h2> linkable? The parent titles as these sidebar headers are great, but making them linkable would be even better. Any help?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Linkable headers’ is closed to new replies.