Need to customize sidebar.php
-
Hello, I have a few questions:
1: How do I edit the various default sidebar items such as the category listings – I want to edit the actual HTML on each anchor so that there is a span within each (for styling purposes) but I cannot figure out where to change this. I know it’s got something to do with wp_list_categories(). So, for example, I want to have the list as it is but with
<a><span>text</span></a>
instead of<a>text</a>
2: If I want to modify a bit of PHP in “post-template” or “category-template” under /includes then surely my changes will get wiped out when I upgrade to a newer version of WordPress, right?
3: I have five pages. On each page I want to specify what sidebar items show. I don’t have to have this functionality within admin panel – I don’t mind doing it in sidebar.php … something like:
My ideal sidebar.php –>
---- if(page=="gallery"){ showPhotosWidget(); } if(page=="contact"){ showContactInfo(); } if(page=="blog") { showCategoryListing(); showRecentPosts(); showMyBookmarks(); } ----
I know those are not the functions or watever but hopefully you see what I mean…?
ANY help is really appreciated! ??
- The topic ‘Need to customize sidebar.php’ is closed to new replies.