WordPress.org

Ready to get started?Download WordPress

Forums

pretty pls . . . styles for lists generated by loop? (4 posts)

  1. tjd
    Member
    Posted 7 years ago #

    Can anyone tell me where in the core program scripts the lists styles for The Loop are generated, or conversely which class to specify in a css style file to change the loop list styles?

    Like:

    <ul>
    <?
    $news=$wpdb->get_results("SELECT
    ID,post_title FROM $wpdb->posts
    WHERE
    post_status= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
    foreach($news as $np){
    printf ("<li><a href=\"index.php?p=%s\">%s</a></li>", $np->ID,$np->post_title);
    }?>

    Generates an indented list and a smaller h3 than the rest of the div they are in, and where the styles for the page have no indents set for lists and a page wide h3 style.

    So how to you set one simple style for all lists on a page which will not be overwritten by some kind of hard coded default?

    And further, where please, oh please is a map of which files do what in the core program?

    Thanks and sorry to bother ....

  2. yosemite
    Member
    Posted 7 years ago #

    Let's see, hmmm. Hack the core files, or make a change to the stylesheet... Tough choice!

    So how to you set one simple style for all lists on a page which will not be overwritten by some kind of hard coded default?

    That would be in whatever css file your theme uses. Typically it's style.css.

  3. vkaryl
    Member
    Posted 7 years ago #

    Unless someone's added a program map to the Codex, I don't think there is one.

  4. tjd
    Member
    Posted 7 years ago #

    Love to. But whatever changes I make to style.css, appear to have no effect on list styles generated from within a mini loop when used as part of a sidebar menu.

    Other menus etcetara, no problem. but lists of posts (fr example a menu of recent post titles) generated by the mini loop carry a different style. Not specified by style.css. Or am I missing something simple and stupid? (Not an infrequent event).

    As to the map,I might start on one. It is a hair tearing exercise finding obscure functions, and doubly maddening returning to a similar fault months later and realising you've forgotten where you found it last time.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags