WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Styles within PHP files (3 posts)

  1. funnyfox
    Member
    Posted 7 years ago #

    I'm using Yahoo's version of WordPress to build a new blog. I work with CSS files a lot but know nothing about PHP files.

    I installed a new theme I found online called Travelogue. You can see it at http://www.funnylikeafox.com. I'm trying to change the display of the links within the sidebar boxes. As you'll see on the site, I was able to do that with the About link, but cannot do it with the June 2007 link. This is the section from the sidebar code that relates to the archive box:

    <div class="sidebox">
    <div class="boxhead">

  2. <h3><?php _e('Archives'); ?></div></h3>
    <div class="boxbody">

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

    </div>
    </div>

    It looks to me like this line, <?php wp_get_archives('type=monthly'); ?>, calls another PHP file, either called Get Archives or Archives? And within that PHP file must be the style definition for the links that it generates. Is that correct? And, if so, is there any way I can access that PHP file to change the style definition? For example, can I get the full code for that file and place it within the sidebar.php file so I can edit it as necessary?

    I can make the change to the About link because the style definition is in sidebar.php itself, but if I can't make the change across all boxes, that's very limiting.

    Any assistance would be appreciated.

  • Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    For example, can I get the full code for that file and place it within the sidebar.php file so I can edit it as necessary?

    No. The whole point of *generating* that html is that it is, in fact, generated. It changes. Right now, you only see the June 2007 link. As time goes on and you make more posts, you'll see more links appear there. That generated code changes depending on various things, which is why you want it generated.

    Anyway, I fail to see why you can't style it as it is? You can reference the list item with .boxbody ul li. Like so:

    .boxbody ul li {
    whatever: whatever;
    }

    What more do you need?

  • funnyfox
    Member
    Posted 7 years ago #

    That solved it, thanks.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags