WordPress.org

Forums

How to edit my source code? (19 posts)

  1. yung_chi_lee
    Member
    Posted 10 years ago #

    Hello,

    I have a calendar on my blog (www.yunglee.com) that doesn't look quite right. The person who created the CSS for the calendar told me how to change some things. However, I need to edit the html on my page. How do I go about doing this?
    I mean, I right click my home page, choose view source and the code in there is what I want to change. I tried doing this in the theme editor but its not the same code. I'm guessing it has to do with PHP which I have no experience with at all. PLease help if you can. THanks.

    Yung

  2. ColdForged
    Member
    Posted 10 years ago #

    If you're on WordPress 1.5, go to "Presentation => Theme Editor". From there you have all of the files in your theme and can edit it right there.

  3. Lorelle
    Member
    Posted 10 years ago #

  4. yung_chi_lee
    Member
    Posted 10 years ago #

    Hey coldforged, I really like your site by the way...if you're the same guy i'm thinking of.
    Anyhow, the theme editor doesn't display what the actual source page displays so I can't edit what I'm trying to edit. Weird eh?

  5. ColdForged
    Member
    Posted 10 years ago #

    Thanks, I'm sure mine is the site you're thinking of since it is obviously a thing of beauty which is admired by all :). Oh, I kill me.

    Well, your templates will be different from the resultant HTML generated by WordPress. The templates tell WordPress how to generate the look of your site, so those templates are filled with PHP that won't show up in the eventual HTML if you view source.

    Your calendar will typically be in the sidebar.php file. However, if the person who created your CSS told you to modify how the calendar is created that will be tricky... the calendar -- if it's a typical WP calendar -- is generated dynamically inside a function. It's not static HTML.

  6. yung_chi_lee
    Member
    Posted 10 years ago #

    oh bbbbbbooooooooo....

  7. yung_chi_lee
    Member
    Posted 10 years ago #

    so CAN it be done? If yes, how? : )

  8. ColdForged
    Member
    Posted 10 years ago #

    It would help if we knew what you wanted to change.

  9. yung_chi_lee
    Member
    Posted 10 years ago #

    Okay, on my blog, there's a section at the bottom of the calendar that looks out of place. Actually, it shouldn't even be there. The person who helped me with the CSS said that it could be because of the footer in the HTML source code since her blog using the same calendar CSS looks fine. I wanted to edit this to see if that is the cause of the problem but I can't edit to remove the footer in the section of the calendar : (

  10. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    The sidebar can be edited via the Sidebar Template (usually sidebar.php) and the footer can be edited via the Footer Template (usually footer.php).

  11. yung_chi_lee
    Member
    Posted 10 years ago #

    For the particular theme I'm using (Landzilla), there is no sidebar.php or footer.php file. And, I'm not trying to delete the actual footer but if you view the source, in the section where the calendar is, there is a footer tag there that I want to remove.

  12. ColdForged
    Member
    Posted 10 years ago #

    It must be in the main index.php then.

  13. yung_chi_lee
    Member
    Posted 10 years ago #

    well, yes, I put the calendar div id in the main index.php. The sidebar info is located there too. I guess I just need to find a way to edit the static html.

  14. ColdForged
    Member
    Posted 10 years ago #

    That's just it, you can't edit the static HTML because it doesn't exist. WordPress generates the content dynamically every time it's requested.

  15. yung_chi_lee
    Member
    Posted 10 years ago #

    Ohhh I c : (

    <h2>Calendar</h2>
    <div id="calendar">
    <?php get_calendar(); ?>
    </div>

  16. ColdForged
    Member
    Posted 10 years ago #

    Precisely.

  17. Yngwin
    Member
    Posted 10 years ago #

    So if you want to change that you need to edit the core code of that function.

  18. moshu
    Member
    Posted 10 years ago #

    Most or all(?) of the very different calendars that I've seen on different blogs do not alter the core code, but manipulate the display of the calendar through the style.css file. There is a whole section in it that deals with the calendar :)

  19. moshu
    Member
    Posted 10 years ago #

    As to the OP:
    Okay, on my blog, there's a section at the bottom of the calendar that looks out of place. Actually, it shouldn't even be there.
    That calendar "footer" as you call it is the place where links to the previous (and next?) month will appear when you'll have posts in more than one month. Just look around and check it on some blogs :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.