Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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

thanks

like image 630
tomer Avatar asked May 05 '16 07:05

tomer


2 Answers

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

like image 125
naveenkumar.s Avatar answered Oct 03 '22 23:10

naveenkumar.s


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

like image 40
stalin wesley Avatar answered Oct 03 '22 23:10

stalin wesley