• Resolved artcase

    (@artcase)


    Hi, Me again…
    I’ve found out why my month archive data lines are getting extra padding, they are being separated by an li (list) tag.

    Site here

    So I’ve looked in the side bar, not there… looked in the template-functions-general.php not there either unless it is implied? IDK.

    Help? I want it out of there.

    Thanks.

    A.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Do you see the actual month archive code in the sidebar.php? In most templates, that’s where it’s at. Once you find that code, look at the class of the div for that section. Then, edit the padding in your stylesheet. If that doesn’t work and your template is a free public template, tell me where to find it so that I can download it and try to find it.

    The “li” comes from the get_archives_link function, called in the wp_get_archives fuction. Both are located in template-functions-general.php starting at the line 334.

    You shouldn’t edit the core functions of WordPress… It will be a hell to upgrade. The best solution is to style the list in the div to fit the layout you want, like t3ch33 told you in the post above

    Your site seems to use many css style sheet. As I understand it, you don’t use the sidebar div, instead, you have a “leftmenu” div, declared in my-art-case.com/bookcase.css…

    So, your solution is to style the lists nested in “leftmenu”…

    #leftmenu ul
    padding : 0px
    margin : 0px

    #leftmenu ul li
    padding : 0px
    margin : 0px

    Then, play with the amount of pixels to fit the layout you want for these lists…

    You’ll maybe also need to declare list nested in a list (#leftmenu ul ul and #leftmenu ul ul li)

    By the way, you don’t have the “ul” before the archive list… It could be a good idea to use it… Normally, you should use the wp_get_archives between “ul” and “/ul”…

    By the way 2, having a collection of stylesheet is maybe not the best practice… ??

    S.

    Thread Starter artcase

    (@artcase)

    The template is (loosely) based on Kubrick v1.5 https://binarybonsai.com/kubrick/ I added css and styling to the pages so they would match my existing site design/layout.

    There isn’t an li in the sidebar.php added.

    I’ve looked at the div class as well and took out references to line-height, etc. BUT the side bar is a definition list (in my layout) by nature, would adding an li to it instead of dd cause it to weird out?

    From my browsing, it looks like that is the case, but I still don’t know why it is giving it a designation as a list item.

    Still confused.

    A.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Just edit your call to wp_get_archives to set the format parameter to none. Then the LI’s will go away.

    Like this:
    wp_get_archives('format=none&type=monthly');

    wp_get_archives assumes you want LI’s by default. This is the format=html setting. It has a few other options, like format=link (for page headers) or format=option (for dropdowns), but the default is assuming you want list items, for inclusion in a UL or OL.

    If you set format to “none”, then you get no surrounding formats. If you want some, you can set before and after to what you want them to be, like before=<dd>&after=</dd> or whatever makes sense for your case.

    Thread Starter artcase

    (@artcase)

    Thanks SimonJ.

    That makes a lot of sense. What exactly gets changed when you upgrade versions? just the wp_ type files or the entire template?

    Since I’m working “off template” to make the WordPress areas look like the rest of my site, I’ve made beginner mistakes like messing with the core functions. Help to set me straight is greatly appreciated.

    Side note: (and this is not meant to complain) WordPress’s community is great and the functionality of the program amazing, however “ease of use” for someone wanting to design a web page is over most newbie’s heads IMO. A tutorial on how to “customize” WordPress would be invaluable, especially if it showed you how to make your WordPress look like/fit in with your existing site. I haven’t come across a “newbie friendly” one yet.

    A.

    Read the post of Otto42… He got the solution to get rid of the “li” when you call wp_get_archives… ??

    On my side, I prefer to keep the ul li and make them appear as I want with CSS… Matter of choice…

    You wrote : “WordPress’s community is great and the functionality of the program amazing, however “ease of use” for someone wanting to design a web page is over most newbie’s heads IMO. A tutorial on how to “customize” WordPress would be invaluable, especially if it showed you how to make your WordPress look like/fit in with your existing site. I haven’t come across a “newbie friendly” one yet.

    he he he… If you try to work with other open source code for CMS or online shop for instance, don’t want to put name here, you will soon find that WP is by far the easyest one to cutomize… ;-)… By far… The codex and this forum are really great documentation. For 99% of my problems, I always find the solution here or in the codex.

    In any case, when you fall in css and website building, you will find problems that falls way over most newbie’s heads… This is why, I guess, WP is providing theme that works out-of the box for the beginners. But step by step, with little time, there is nothing in design you can’t do with WP.

    By the way, I think Moshu is working on a tutorial to fit WP in a site alredy designed.

    S.

    Thread Starter artcase

    (@artcase)

    Fixed, finally.

    I tried many variations to get css only tweeks to do the trick, but they didn’t work. I ended up having to go into the template anyway (template-functions-general.php) in order to take the link navigation hack by Orien “li” additions out. I don’t know how I missed that before/after thing.

    A.

    Thread Starter artcase

    (@artcase)

    By the way, I think Moshu is working on a tutorial to fit WP in a site alredy designed.

    Really? I can give him insight to all the mistakes I made… ??

    I’m looking forward to his work.

    A.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Where is the li coming from?’ is closed to new replies.