• I apologize in advance for the stupid question – this is obviously something really obvious, but as I’ve googled it and searched this board, I just can’t figure out how I should do this.

    I’m customizing a WordPress 1.5 theme using entirely HTML and PHP – no CSS. Everything’s working well, with the exception of the “Links,” “Pages,” “Archives,” etc. pages that are automatically placed on the sidebar through PHP includes. They load onto the page OK, but display in HTML list format.

    I know this is standard for WP, but I can’t figure out where to modify it. If anyone could shine some light on it, it would be highly appreciated. TIA, and sorry for the dumb question.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Some template tags will let you alter whether to display their output in list tags or not through their parameters:

    https://codex.www.ads-software.com/Template_Tags

    For the rest, if you’re not handling layout through css then you’ll have to edit the various functions within the WordPress source to change the html elements they output.

    There is also a good article on the Codex about the sidebar lists that is designed to help people style them using CSS but it includes information to help understand the sidebar better.

    https://codex.www.ads-software.com/Styling_lists_with_CSS

    Breaking web standards and regressing is very hard work. I sympathize with you.

    Thread Starter unscd045

    (@unscd045)

    Thanks for the help – I’ll take a look at those links, but I may actually end up using CSS, at least for the template tags. Yep, I am being backward, but oddly enough I prefer HTML to complicating things with CSS, just because of the bad habits browsers have in interpreting layout CSS differently. It’s definitely necessary sometimes, though.

    Thread Starter unscd045

    (@unscd045)

    Thanks again for the help… the Template Tags page on the wiki is quite helpful. I’ve run into another problem, though. The wiki says that

    <ul>
    <?php wp_list_pages('title_li=');???>
    </ul>

    Displays no heading for list, and list is not wrapped in <li><ul>, </ul></li> tags. (Note the absence of any space after the = sign.)

    But when I do this, it still displays them in list format. Is there something that I’m missing, or do I just need to edit the WP code itself?

    I’ve been looking at this myself. wp_list_pages calls _page_level_out which sure as shootin’ looks like it will insert <li>‘s despite any parameters you set. That’s OK for me… I just wanted to suppress the title and let the page items display as an unordered list. To do that I had to tweak wp_list_pages just a tad, adding an ‘else’ statement to the ‘if there’s a title’ bit…

    Thread Starter unscd045

    (@unscd045)

    Thanks, rosco47! That was perfect… _page_level_out was exactly the function that was inserting the evil <li> tags. By chance, do you know what function does the same for the archives links?

    I’ve been playing around with the wp_list_pages function as well, and have found it really annoying that it insists on adding that outside <li id=”pagenav”>. I’m modifying the Connections theme, and in IE the Pages section doesn’t display properly because of the pagenav li. In Firefox it’s fine….but a few friends insist on using IE despite my incessant preaching.

    I would like to keep my blog as ‘compatible’ as possible, to simplify future upgrades etc. Is there anyway possible to exclude that bit within the function?

    site is at https://www.ality.org

    Thread Starter unscd045

    (@unscd045)

    Hmm, I’d think that that would be in wp-template-post.php (where I modded _page_level_out) but I couldn’t find any reference to <li id=”pagenav”>… maybe someone who actually knows something about WordPress could answer you. ??

    I found it in template_functions_post.php – line 314
    echo '<li id="pagenav">' . $r['title_li'] . '<ul>';

    removed the bold section and the themes now behave in both IE & FF now. I just hope that this doesn’t break other themes.

    I don’t know about the archives link. Will probably have to rassle with that some day.

    To back-pedal a little, turns out the wp code works fine and I don’t have to edit it to suppress the ‘Page’ title. There’s a codex description that describes just what I wanted to do and it works:
    <ul>
    <?php wp_list_pages('title_li='); ?>
    </ul>

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Formatting Links/Pages/Archives/etc?’ is closed to new replies.