• Resolved BetsyS

    (@betsys)


    OK, so I’ve got a 2011 child theme activated, mainly for a website rather than for a blog, and I even succeeded in widening the page and setting up @fontface with a font I downloaded from Font Squirrel. But my illusion of competence is dissolving as I contemplate changes like redesigning the ugly black bar that the menu buttons are on, (I want it to be a fine black line underneath the buttons, and I want the buttons to be designed differently and have different visited/hover/active responses, etc.) I could figure that stuff out by reading html tutorials, if I were building a regular webpage, but php is still utterly unfamiliar to me. My fragile grasp of CSS is confounded by the php templates, and I don’t know how to find the pieces I want to style.

    Is there any way to integrate html in WordPress page templates, or am I stuck with having to learn php?

Viewing 2 replies - 1 through 2 (of 2 total)
  • PHP is a server side language, whereas HTML is client side. What gets confusing is the fact that PHP is embedded into HTML. However, it’s still PHP.

    All PHP does is generate HTML.

    So if you want to make cosmetic changes to existing parts of your site, you don’t need to worry about PHP. All you need to do is identify what you want to change, and edit the CSS for that element.

    If you’re having trouble because you’re trying to identify the elements in the themes files and you’re just seeing PHP, this is because this is the wrong way to do it. The right way is the use the Developer Tools (Firefox/Chrome) to look at the actual generate HTML for your pages. Then, you can see what the IDs/Classes of the elements you want to adjust are.

    If you want to add to your pages, then whether you use HTML or PHP is simply down to whether the elements and bits you want to add need to be dynamic or not. If they’re just going to be static, i.e their content not changeable, then use HTML. If you want the content to be changeable, you’ll need to use PHP

    If you want to familiarise yourself with how WordPress works with PHP, read the theming section in the codex. It explains everything comprehensively.

    Thread Starter BetsyS

    (@betsys)

    Thanks, brightonmike. That makes sense. I’ve known that I should become familiar with Firefox developer tools, and I’ve procrastinated it, but it sounds like they’re definitely the key here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can you combine html with the php?’ is closed to new replies.