Website Babble Webmaster Forums  


Go Back   Website Babble Webmaster Forums > Creating a Website > HTML, PHP, CSS, Javascript & Coding/Programming Topics

Your WB Notifications

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-21-2009, 07:02 AM
BreLove's Avatar
Master Babbler
 
Join Date: Sep 2009
Location: ATL
Posts: 211
BreLove has more than the average amount of reputation points
Default View/Source vs Wordpress Template Files

View/Source is alot easier for me to understand and update than the Wordpress files located within my template. Anyone see any issues with my altering my pages through my main files instead of the WP template?
__________________
www.Resourceful-Mom.com - Single but not without resources
Reply With Quote
  #2 (permalink)  
Old 10-21-2009, 09:20 AM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 158
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

By View/Source, do you mean going to the View menu in your browser and clicking Source? Or have I just got the wrong idea completely...?
__________________
Pole Exercise - Pole dancing evolved
Reply With Quote
  #3 (permalink)  
Old 10-21-2009, 09:21 AM
BreLove's Avatar
Master Babbler
 
Join Date: Sep 2009
Location: ATL
Posts: 211
BreLove has more than the average amount of reputation points
Default

Nope, you are absolutely correct; however, I know that I can't update from there specifically - I'd need to update from/to my server files.
__________________
www.Resourceful-Mom.com - Single but not without resources
Reply With Quote
  #4 (permalink)  
Old 10-21-2009, 09:54 AM
TechieGuy's Avatar
Super Moderator
 
Join Date: Jul 2007
Location: Canada
Posts: 2,456
TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!TechieGuy is an exceptional WB member with over 1,000 rep points!
Default

If you are talking about updating your source that is returned from the server to the browser, it won't work with Wordpress.

Wordpress uses PHP, which is executed on the server to generate the source. You will need to edit the PHP files instead of the source to modify the template, or your blog won't function properly.
Reply With Quote
  #5 (permalink)  
Old 10-21-2009, 10:06 AM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 158
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

OK, thanks. Then the short answer is you can't do that unfortunately. Edit: Aaarg! Too slow!

WordPress is written in PHP, a programming language. When you access a page on your site, the PHP is executed and it outputs the HTML you see in your browser. But these HTML pages aren't stored anywhere (ignoring caching and the like); they're generated each time.

Sometimes the PHP source is basically the same as the HTML it produces. For instance

PHP Code:
echo "This is some PHP.  Isn't it fun?";
will output

Code:
This is some PHP.  Isn't it fun?
But often it's more complicated than that.

PHP Code:
echo "<p>Look!  I can count!</p>\n<p>";

for (
$i = 1; $i < 6; i++)
{
echo
" " . $i;
}

echo
"!!!</p>";
The output here will be

HTML Code:
<p>Look!  I can count!</p>
<p> 1 2 3 4 5!!!</p>
When I access your site, your server calls index.php in your site root. This file then calls a load of other WordPress files, including your template. The output from all of these files comes together to make the page you see.

For instance, your template's index.php (the blog homepage template file) probably looks something like this

PHP Code:
<?php get_header(); ?>

<div class="Main Home">
if (have_posts())
{
    while (have_posts())
    {
        the_post();
        ?>
        <div class="Entry">
            <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
        <?php
        the_content
(MORE_TEXT);
        
wp_link_pages(MULTIPAGE_TEXT);
        
?>
        </div>
        <?php
    
}
}
?>
</div>
<?php
get_sidebar
();
get_footer();
?>
The first line tells WordPress to load your theme's header (header.php). This is a good thing because it means you only have to write the header code once, rather than for the archives and page and post views too. Then there's a load of gubbins while WordPress runs through the loop loading your recent posts. And finally there are two calls to tell WordPress to load the sidebar (sidebar.php) and the footer (footer.php), again saving you writing those more than once.

It is a little more difficult to see how it all fits together at first, but being able to reuse the same code in many situations is a huge bonus and is what makes programs like WordPress possible.
__________________
Pole Exercise - Pole dancing evolved
Reply With Quote
  #6 (permalink)  
Old 10-21-2009, 12:07 PM
BreLove's Avatar
Master Babbler
 
Join Date: Sep 2009
Location: ATL
Posts: 211
BreLove has more than the average amount of reputation points
Default

Ok, that explains how PHP fits into everything. Thank you both!!
__________________
www.Resourceful-Mom.com - Single but not without resources
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -6. The time now is 09:37 AM.


 Subscribe to RSS

WB Sponsors

Search Engine Optimization

flash chat

Home Jobs Online

Search Engine Marketing

Paid Surveys

Web Design Company

custom website design

Best Links Management Software

Online Advertising Solution FREE trial!



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0