Support » Themes and Templates » Hoe do you edit the HTML and CSS of a wordpress page (theme)

  • Hey guys, So everything on my website is working fine but all the files are in php? I want to edit the actual html of my site as if viewing the source code of for example my main page? What is the simplest way to do this, I know its possible I am a beginner so please help! Thanks! I am willing to hire possibly: add me on skype: [skype moderated – the forum dos not provide this kind of support] but I really need to know how to view and edit my html, im just getting .php files!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Michael


    Forum Moderator

    depending on what exactly you want to change, look either into the content of the posts or pages (via dashboard – posts/pages – edit post/page), or look into the php templates of the theme which also contain html; further there is the output of the widgets or some output generated by plugins …
    CSS is generally within style.css of the theme or any other stylesheets called from the theme.

    I am willing to hire possibly:

    consider to post a job at

    How do you do this though, when I open up the php file its in php wheres the raw html!



    Forum Moderator

    wheres the raw html!

    of what?

    what are you trying to edit?

    there might be some clues in here

    Okay take a look at my site I want to customize that front page there to my hearts content with html not lame .php and I want an easy way to do it! Do you know how sir please tell me how!

    When you open the index.php, you’ll see php code like

     * The main template file.
     * This is the most generic template file in a WordPress theme and one of the
     * two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * For example, it puts together the home page when no home.php file exists.
     * Learn more:
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
    get_header(); ?>
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    		<?php if ( have_posts() ) : ?>
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    				<?php get_template_part( 'content', get_post_format() ); ?>
    			<?php endwhile; ?>
    			<?php twentythirteen_paging_nav(); ?>
    		<?php else : ?>
    			<?php get_template_part( 'content', 'none' ); ?>
    		<?php endif; ?>
    		</div><!-- #content -->
    	</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    (this is from the twentythirteen template.

    you see those functions <?php get_header(); ?> or <?php get_footer(); ?>

    those are calling the header.php file and footer.php file.

    if you open those up (and other .php files associated with the theme) you’ll see the base html with php code inside them.

    all your index.php file is doing is calling other php files to load other html/php.

    as alchymyth suggested, read up on Theme_Development in the codex and you’ll have a better idea of what’s going on.

    Im sure there has to be an easier way to change the html, this is making me cry! I want to edit it as if I was looking at the view page source and editing it :'<

    Unfortunately, there is no easier way – PHP based websites don’t have static HTML pages the way static sites do.

    You also need to stop asking people for help via SKYPE – these forums don’t provide that level of support, sorry.

    Alright alright whateves.

    Wait wait! Quick question, What if I were to edit the files or whatever on my theme in wordpress then I can just copy and paste the HTML and upload it to my ftp and run it off there and only use wordpress to style and customize it?

    Not exactly. WordPress only works with a valid WP theme – so it won’t work if you delete any necessary code for it to work. You CAN change the theme/content to be what you want – but that gets you back to square one of having to learn how WP is coded :/ .

    Why not just start learning it?

    You could also look at using a “blank” theme – which may make it easier to add the HTML/CSS you want. Look up BlankSlate, Toolbox, and Underscores_me.

    Thanks WPyogi for the “blank” theme resources. Hoping they’ll help with my issues.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Hoe do you edit the HTML and CSS of a wordpress page (theme)’ is closed to new replies.