get_links_list Customization
-
Alright, so, for quite some time I have been working on iwannaplay, which is an online Arcade site. And, the progress has gone smoothly. However, I have hit a stump in the road– I want to add a blog. Now, that would be easy normally, but I don’t want to be like the majority of webdesigners and use premade skins. No, I have to make my own.
I am basing it off of my sites, so that way it fits in. This progress has gone well, but, now I’m at the sidebar.
Here is the code I would use for a sidebar item:
‘ <div class=”box-header”>- <h2><?php _e(‘Archives’); ?></h2>
</div>
<div class=”box-content”>
-
<?php wp_get_archives(‘type=monthly’); ?>
</div>
‘
It has a header class, and a content class, then I would just repeat it for each item. It worked!~ For two of the menu items. However, Blogroll and pages are different.
Here is my progress so far:
http://www.iwannaplay.org/blog
As you can see, I have the majority of the menu done, as said, except for the Blogroll and Pages section. Here is my blogroll code:
‘ <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<?php } ?>’That, I have NO CLUE how to edit into working with the afformentioned code.
Here is my Pages Code:
‘ <?php wp_list_pages(‘title_li=<div class=”box-header”><h2>’ . __(‘Pages’) . ‘</h2> </div>’); ?>’Clearly, I got the header part done. The content part…. Not so well.
How would I modify wp_list_pages and get_links_list? I can’t even find where the functions are at.
- <h2><?php _e(‘Archives’); ?></h2>
-
well, see I think you’re going about this entirely the wrong way.
instead of putting a div around your h2, and div around the list, why not just use the classes that are already there? Ditch those extra divs, they’re pointless.
<?php wp_list_pages('title_li=<h2>'.__('Pages').'</h2>'); ?> <?php wp_list_categories('title_li=<h2>'.__('Categories').'</h2>'); ?>
.categories h2, .pagenav h2 { put BOTH the box-header style stuff here as well as the H2 stuff you were using } .categories ul, .pagenav ul { put the box-content stuff here. } .categories ul ul, .pagenav ul ul { negate the stuff you did up there, remove borders, reset the padding and margins, whatever you don't want that stuff showing up for child pages/cats }
everything has its own classes already, just *use* them
- The topic ‘get_links_list Customization’ is closed to new replies.