How to edit the html code in wordpress theme

I have a wordpress blog and I want to customize it a bit. I know CSS and HTML but not php. from what I understood the php should call the html code, so if i could find the html code it will be easy for me to customize my blog.

The thing is, I can’t find the html code. I looked at appearance –> editor and it is all php files and one css.

Read More

Someone has an idea how to edit the html code/find it ?

thanks

Related posts

3 comments

  1. If you want to edit your wordpress theme html , css etc. Kindly follow the steps.

    Always use a child theme

    Before you start editing your WordPress theme create a child theme. Child themes are important, because they protect your original theme files.

     Appearance → Themes->your child theme-> activate
    

    Edit WordPress theme HTML

    Go to Appearance → Editor in your WordPress dashboard and choose the child theme you have activated.

    There are index.php, functions.php, header.php, footer.php etc.

    In its most basic form, PHP is grabbing content from your WordPress site and outputting it in an HTML page. Take a look at this section of code specifically:

    <div class="site-info">
    <?php do_action( 'twentyfourteen_credits' ); ?>
     <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyfourteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?></a>
     </div><!-- .site-info -->
    

    That code translates to this HTML:

     <div class="site-info">
     <a href="http://wordpress.org">Proudly powered by WordPress</a>
     </div><!-- .site-info -->
    

    Try to understand like the above codes php and html. you can easily edit it.

    Edit WordPress theme CSS

         Appearance → Editor->style.css(child theme). 
    

    you can change the style of detailed reference click here

  2. Go to your wp-admin, Appearance (on the left sidebar), Editor. Select a theme and a file to edit, then press Save.

  3. In WordPress Dashboard > Appeareance > Editor you can’t edit HTML files (only PHP and CSS files) as you can read in Codex – “Editing files”

    Your question could become why don’t you see HTML in PHP files?

    This is because PHP generates HTML code and then you can see lots of PHP code inside a PHP file, but not necessarly HTML code. In order to understand how PHP works I suggest you to read this useful tutorial.

Comments are closed.