WordPress.org

Forums

Archive List (15 posts)

  1. gahazzah
    Member
    Posted 10 years ago #

    I'm looking to simply make a list of my archives at the bottom of my page. I have ditched most everything else (categories, search, calender, et cetera) and the best I can figure (from going through page after page on this support forum) is that I need to use a function like <?php get_archives() ?>.
    That's fine and easy to do but how do I get the links to format in a weekly fastion and customize the output? Also, how do I get rid of that stupid bullet point? I've tried several suggestions regarding this idea with the category view but nothing seems to work.
    I don't want the date to show up like it does on my posts (D, j F Y) because I don't want the day (D) to show up. I just want the following output at the bottom of my page;
    j F Y - j F Y
    That's it (well, linked to the entries obviously). No bullet point, no pizzazz, no nonsense. How do I accomplish this?
    Please and thank you in advance.

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    No bullet point is including
    list-style:none
    in the part of the css that is controlling the output.

  3. gahazzah
    Member
    Posted 10 years ago #

    Man podz, you're all over this place. heh
    Thanks, but I have a question about that. I have my own css controlling my site and there is no output in it for lists at all (I keep it down to exactly what I'm using) so where would it be calling that from? Does WordPress still execute the native css even when you have your own running (and just cascade it behind the inline one)?
    I'm rather confused on how this works still (I've weening myself off of MT and Blogger so it's taking a bit of time to wrap my cortex around this).

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    It's calling it from within the wp core.
    Best way to do it is to put it where you want the list to appear, accept it will look skanky for a while, then 'View Source'.
    You will see the output code - which will probably be invalid too - and then it's very easy to put the correct tags around it inside of index.php and write a small bit of css to get the look / colour / size / behaviour you want.

  5. gahazzah
    Member
    Posted 10 years ago #

    Ok. I viewed the source and it comes out with;

  6. August 2004

  7. </>

    That explains the bullet point and thank you for explaining that it is coming from within WP itself. Now, are you saying that I should go and add to my .css in order to counter this?
    While I can setup a new parameter in my css to fix the color and feel of it how will that change the actual textual output of "August 2004" or the spaceless weekly output that comes out?

  • gahazzah
    Member
    Posted 10 years ago #

    BTW -
    I'm not above hacking the system if that is what it will take... I just need to know what to look for...

  • Mark (podz)
    Support Maven
    Posted 10 years ago #

  • gahazzah
    Member
    Posted 10 years ago #

    Ok. Before I check the links I want to figure something out... you say that the lists aren't valid but the thing is, I'm not using a list. My code in my index.php is;
    <?php get_archives('') ?>
    That's it. No list, no nothing. Where is it even pulling the

  • from? I understand that it's not valid but I don't even understand where that is coming from to begin with.

  • Mark (podz)
    Support Maven
    Posted 10 years ago #

    The li is coming from the code.
    If you have archives, then they will over time become a lot of archives, and it you are going to output them, it makes sense for them to be in a list.
    You could probably find the code that does it and strip the li out, but then you would still have a list - and the fact it is a list gives you good styling control.
    You could use a drop-down box ?

  • gahazzah
    Member
    Posted 10 years ago #

    Using the links (thanks) I was able to get rid of the bullet and make the output look like;
    Mon, 16 August 2004–Sun, 22 August 2004
    Now, how would I change that to make it ditch the day of the week at the front and to put spaces around the hyphen between the dates?

  • gahazzah
    Member
    Posted 10 years ago #

    Yeah, I suppose I could use a drop-down box. In all honesty, the only reason I'm putting the list at the bottom of my page is because I can't figure out how to call it from another page (my header.php) as it won't parse unless it is in my index.php (or so it seems).

  • Anonymous
    Unregistered
    Posted 10 years ago #

    What would be the easiest way to incorporate a pull-down menu and could I call it from another file because I would want it to reside in my header file and not on my index.php is possible.

  • gahazzah
    Member
    Posted 10 years ago #

    forgot to login... whoops...

  • Mark (podz)
    Support Maven
    Posted 10 years ago #

    Here's mine:
    <li id="archives">Archives:
    <form name="archiveform" action="">
    <select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
    <option value=''>By Month</option>
    <?php get_archives('monthly','','option', 1); ?>
    </select>
    </form>


  • If this does not format well, look here:
    http://paste.uni.cc/1770

  • gahazzah
    Member
    Posted 10 years ago #

    Ok, I can see how that works but when I drop it into my header.php the rest of my content ceases to exist (index.php and footer.php et cetera). I can get it to work in my inxex.php just fine but that places it below my posts.
    Hmm. Perhaps using header and footer files to keep even my static pages looking the same was a bad idea. =/

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.