Editing Page Templates
-
I’m trying to make the sidebar for my “Links” template page seen here, look similar in style to the sidebars on all my other pages seen here.
I’ve never edited any of this stuff before, but so far I’ve managed to get the indenting & bullets in their proper place. The only thing I have left to do is change the color of the “Blogroll” text (should be black), the color of the bullets (should be yellow/orange), and the spacing between the bullet items.
This is the code from the Links-Text Page:
<?php wp_list_bookmarks('title_before=<h3 class="page-links-title">&title_after=</h3>&category_before=<li id="page-%id" class="%class">&after=</li>&link_before=<ul><li>&link_after=</li></ul>')?>This is the code from the other pages:
<?php if ( count($post->ancestors) === 0 ) //if it's a top-level page, we'll show all it's children { echo substr(wp_list_pages('sort_column=menu_order&child_of=' . $post->ID .'&echo=0&title_li=<h3 class="page-links-title">' . get_the_title($post->ID) . '</h3>'), 20, -5); } elseif ( count($post->ancestors) === 1 ) //if it's a second level, we'll show all its parents' children { echo substr(wp_list_pages('sort_column=menu_order&child_of=' . $post->ancestors[0] . '&echo=0&title_li=<h3 class="page-links-title">' . get_the_title($post->ancestors[0]) . '</h3>'), 20, -5); } else //if page it's more than two levels deep, we'll show all of its top-level ancestor's children { echo substr(wp_list_pages('sort_column=menu_order&child_of=' . $post->ancestors[1] . '&echo=0&title_li=<h3 class="page-links-title">' . get_the_title($post->ancestors[1]) . '</h3>'), 20, -5); } ?>Any help would be greatly appriciated!!!
The topic ‘Editing Page Templates’ is closed to new replies.