• Hi. I have searched the forums and codex, and have not received the answer I am looking for. It is straightforward, I think.

    My question is, where is the HTML in WordPress? I keep seeing people talk about editing HTML, etc. And I have been learning HTML. But everything on wordpress seems to be PHP and the Loop.

    Does PHP translate into HTML when I FTP? It may be an obvious question, but I am confused.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You’re not asking a stupid question… ??

    You can use HTML inside a file that ends with .php (when done carefully) and that might be where the confusion is.

    For example, if I want to put a static link in my sidebar, I’d open sidebar.php and find the spot where I want to add it, and then use <a href="www.site.com">Link</a> which is HTML.

    PHP is kind of a programming language, while HTML is “hyper text markup language”… does that help any?

    Thread Starter kritic

    (@kritic)

    I think I understand. So it’s best to learn wordpress PHP to know where to enter the HTML? For instance, I have no idea what “””<?php /* If this is a yearly archive */ } elseif (is_day()) { ?> “”” on the sidebar, but below that is HTML I recognize.

    It’s best to leave the PHP there and work with the HTML, or learn the PHP and what I can remove or not remove.

    It’s just I have been learning HTML, so for instance index.html, then folders of other pages, say about, so about.html, etc. Instead, there are php files for each HTML element, instead of containing inside one file. I think.

    Thank you

    “So it’s best to learn wordpress PHP to know where to enter the HTML?”

    Short answer, yes.

    Try checking this stuff out:

    https://codex.www.ads-software.com/Using_Themes/

    One thing to understand about the difference between your examples of index.html and about.html, and then the index.php and about.php pages that WP uses is that the html files are static. That is, all the code and data are on that html page. The WP pages are dynamic. The data is stored in the mysql database, the code is on the page. So you will use html to help format the data, the php is used to manipulate and call the data, and CSS is used to style and further format the data.

    Aside from the theme info, if you want to learn more about the WP specific PHP functions, you might want to start familiarizing yourself with Template_Tags, and the various sections within.

    Thread Starter kritic

    (@kritic)

    Ahh ok. I had seen the Using Themes page before, but I didn’t really know what to make of them. Now that I know about template tags and such, I know what to look for. I suppose I just wasn’t sure what to research in order to understand, but now I am starting to know what to learn. Thanks so much.

    ?? I learn something new about this stuff every day! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘I feel like an idiot. PHP and HTML question.’ is closed to new replies.