WordPress.org

Ready to get started?Download WordPress

Forums

Adding HTML to existing theme (5 posts)

  1. bradelectro
    Member
    Posted 6 years ago #

    Hi there,

    I'm new to WordPress and reading as much as I can to catch up. I've modified the Kubrick theme on my blog just by replacing images and some simple CSS edits to change the type. That's great, but what I really need to do is add a nav bar from an existing site.

    The nav bar is a combination of heavily CSS styled HTML and a piece of javascript. How do I insert this code into the HTML of my blog?

    I have a feeling this an instance where I would need to create an entirely new template from scratch and upload it to WordPress- am I correct? I've been digging thru all the different .php pages looking for the source code but I think it lives somewhere on WordPress(?)

    Thank you,
    B

  2. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    You can put the html in the header.php file. The css file you can put anywhere as long as your code knows where to look. I did the same in my header.

  3. bradelectro
    Member
    Posted 6 years ago #

    Great- thanks! I notice there are no closing body or html tags- is that because it's php page?

    Thank you,
    B

  4. moshu
    Member
    Posted 6 years ago #

    I notice there are no closing body or html tags- is that because it's php page?

    Absolutely not!
    They are closed in the footer.php.

    Imagine that the "original" one-file index.php has been cut/sliced in many peices:

    header.php
    index.php
    sidebar.php
    footer.php etc.

    For a visual explanation of this, see this post.

  5. bradelectro
    Member
    Posted 6 years ago #

    Ah ha, yes, very helpful. Thanks!
    B

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.