WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom yearly archive links display (4 posts)

  1. Agent D
    Member
    Posted 4 years ago #

    Hi,

    I'm trying to create a menu bar with yearly archive links. I'm using teh code below:

    <?php wp_get_archives('type=yearly'); ?>

    It works fine but the problem is that it displays vertically and I would like it to be bigger and horizontal. I looked into css file and archive.php but couldn't find a spot where you can customize the display. Any idea??

  2. wphelpcenter
    Member
    Posted 4 years ago #

    How to go about this will depend a little bit on your current theme. Do you have a link to where you are using this on your site? I might be able to give you some CSS to accomplish the task.

  3. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    <ul class="archive-menu">
    <?php wp_get_archives('type=yearly'); ?>
    </ul>

    CSS:

    .archive-menu,.archive-menu li {
    margin:0;
    padding:0;
    list-style:none;
    }
    .archive-menu li {
    display:inline;
    margin-right:15px;
    }
  4. Agent D
    Member
    Posted 4 years ago #

    It worked great, thanks!!

    AD

Topic Closed

This topic has been closed to new replies.

About this Topic