WordPress.org

Forums

Hoe do you edit the HTML and CSS of a wordpress page (theme) (12 posts)

  1. Cheezygamer16
    Member
    Posted 1 year ago #

    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!

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    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 http://jobs.wordpress.net/

  3. Cheezygamer16
    Member
    Posted 1 year ago #

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

  4. alchymyth
    Forum Moderator
    Posted 1 year ago #

    wheres the raw html!

    of what?

    what are you trying to edit?

    there might be some clues in here http://codex.wordpress.org/Theme_Development

  5. Cheezygamer16
    Member
    Posted 1 year ago #

    Okay take a look at my site http://www.nexus-host.com 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!

  6. kirtis_njones
    Member
    Posted 1 year ago #

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

    <?php
    /**
     * 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: http://codex.wordpress.org/Template_Hierarchy
     *
     * @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.

  7. Cheezygamer16
    Member
    Posted 1 year ago #

    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 :'<

  8. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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.

  9. Cheezygamer16
    Member
    Posted 1 year ago #

    Alright alright whateves.

  10. Cheezygamer16
    Member
    Posted 1 year ago #

    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?

  11. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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.

  12. kirtis_njones
    Member
    Posted 1 year ago #

    Thanks WPyogi for the "blank" theme resources. Hoping they'll help with my issues.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.