WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to edit html in wordpress? (5 posts)

  1. mrling
    Member
    Posted 1 year ago #

    My site: http://www.jakespharler.com
    Theme: WordPress Twenty-Twelve Child

    I want to have a nice gallery on my site (click on the gallery link) and am using the NextGen plugin to manage it. However, currently I don't want to keep the white background behind it or the title "Gallery" and perhaps want to change some of the other styling. This is just a quick example that somewhat resembles what I'm going for: http://jeremycowart.com/portfolio/

    Using firebug, I can change the styles by editing .site-content, but this also changes styles on the "About" page that I want to keep.
    I figure adding an attribute such as,"div id=background-color about" is the way to go, but am uncertain of where to add this html...perhaps the "content-page.php" file by editing a copy in my child theme? Any other recommendations or tutorials I should check out?

    Thank you for your time!

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    That would be CSS, not HTML, that needs to be modified...You can find it at Appearance>Editor, your themes default stylsheet is the first displayed...

    Note: While editing the file this way can be done, you should use an FTP tool such as FileZilla or your host provided File Manager to backup all site files prior to editing any files in that manner...Also consider using a Child Theme as any direct edits to your theme will be lost on theme update.

    http://codex.wordpress.org/Child_Themes

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    She has a child theme. But no, you don't need to change the HTML - you just need to learn a bit about how CSS works -- this is a good reference site:

    http://www.w3schools.com/css/

    You can use a page specific selector to isolate the CSS to a specific page. Look in the body tag for the page and you'll see a page-id-number usually.

    So for your about page, use:

    .page-id-219 .site-content {
      ...
    }
  4. mrling
    Member
    Posted 1 year ago #

    @Seacost and WPyogi, thank you both for taking the time for your input, I was able to resolve this problem with this code:

    .page-id-251 .site-content article {
    	background-color: transparent;
    }

    Sorry if I did not make it clear enough that I was already familiar with using a child theme and FTP. Also, I am already fairly familiar with the codex, w3schools and css, but do have to reference these sources every once in awhile still. The suggestion to look at the page id located in the body was particularly helpful. I was originally thinking I might have to go into the html to create a more specific id for styling individual pages, but it appears this is not necessary since an id already exists.
    thank you thank you thank you!

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yep, it's added by the body_class function:

    http://codex.wordpress.org/Function_Reference/body_class

    Most useful. Sorry if we under-assumed your knowledge :).

Topic Closed

This topic has been closed to new replies.

About this Topic