Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13473

    Hi, i use a widget to put Archive, Categories, Links etc, on the footer; i want to limit the Archive widget to 8 months links. I’ve changed this code (on footer.php)

    <h2>Archives</h2>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>

    to

    <h2>Archives</h2>
    <ul>
    <?php wp_get_archives('type=monthly&limit=2'); ?>
    </ul>

    i’ve used 2 instead of 8 to test the code. But it is not work. Is possible to do this? Ad is possible to put a “More” link on the archive? Like this

    month1

    month2

    month3

    month4

    month5

    month6

    month7

    other months

    Total 8 links (7 months + 1 more link)

    #79381

    I’ve partially solved with removing the widgets from “footer area” and with some mods on footer.php, now i have only one problem.. i have to add the link to the month not visualized on the list

    #79382

    Hi heavymetaller,

    Try to limit it to 7 and drag a text widget below the Archives, inside the text widget create a list with just one element like this one:

    <ul class="more_archive">
    <li><a href="link_to_archive">Other Months</a></li>
    </ul>

    After adding this inside the widget, save and in your wp-content/themes/display/style.css, add some styling to the widget to make it look like its a part of the Archive List. This might not be the best way to do it, but it would surely work. Hope this is helpful. :)

    Regards,

    Ismael

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Limit the number of Archive links on footer’ is closed to new replies.