Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress Pages – Where is the code?

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #24985
    Paesano2000
    Participant

    Hey first off I’d like to say that Chris your wordpress tutorials were great.
    However I have a question regarding editing your wordpress pages that you create.

    I am aware of the Pages.php file which you can edit, and that’s all fine and dandy, but I am confused about where the content I put into these pages are located so that I can edited them without having to be logged in as the admin with wordpress.
    Its very frustrating that it wasn’t addressed in the videos.

    One might say "whats wrong with editing the html in wordpress?". Well editing the text in there is slow, and lacks code colour coding.
    But the biggest annoyance is all the random <p> tags put all over my code in the post.

    If someone could help me out with this I would really appreciate it as I want to get my blog fully functional :)

    Thanks.

    #58291
    apostrophe
    Participant

    I think you are missing the point of what wordpress, or any cms, is. The content lives in the database, it is served up and placed in the page template on demand. Of course you can only edit your content through the admin panel, that’s why it’s called a Content Management System.

    #58295
    AshtonSanders
    Participant

    *ditto*

    And I’ll add that WordPress will automatically turn two "returns" into a new paragraph. If you don’t want a new paragraph, than keep it on the same (or next) line.

    #58282

    If you are having problems with WordPress adding <p> tags where you don’t want them you can add the following to your theme’s function.php

    Code:
    remove_filter(‘the_content’, ‘wpautop’);
    #58312
    Paesano2000
    Participant

    Thanks for that davesgonebananas, that did the trick for removing those annoying <p> tags, just mention putting the php tags around it, I was smart enough to do so, but others maybe not.

    "apostrophe" wrote:
    I think you are missing the point of what wordpress, or any cms, is. The content lives in the database, it is served up and placed in the page template on demand. Of course you can only edit your content through the admin panel, that’s why it’s called a Content Management System.

    I don’t need a metaphorical explanation of how my content gets posted. I want to know where it goes and is stored literally.
    The reason I wanted to know this is if I could edit the html that I post from within WordPress outside of wordpress. Also out of curiosity I would like to know how wordpress stores the information I post.

    I have seen people write a php file with all the code they need and their main page and then use it as a template when they make a new page within WordPress.
    I think this is close to what I wanted to be done. This allows me to edit the php file in the program of my choosing, and then just have the new post call upon that template.

    #58317
    apostrophe
    Participant
    Quote:
    I don’t need a metaphorical explanation of how my content gets posted. I want to know where it goes and is stored literally.

    Well actually it seems like you do. No you can’t edit the content you post within WordPress outside of WordPress that is the whole point of WordPress. The information you post is stored in tables in the database.
    You said in your original post you knew about page.php, now you say you don’t. Are we talking about pages or posts? They are two completely different things.
    I suggest you start here http://blog.themeforest.net/screencasts/new-wp-video-series-and-free-rockstar-book/

    #58322
    Paesano2000
    Participant

    You explained what I wanted to know :) "The information you post is stored in tables in the database."

    When I refer to pages, I’m talking about the creation of pages within WordPress admin, which calls on the page.php file.
    The content of that being: <?php the_content(‘<p class="serif">Read the rest of this page &raquo;</p>’); ?>
    I want to know if there is a way I can make my own php file which then gets uploaded as the the_content.

    I have read about using templates, but I don’t see anything about templates in wordpress 2.7.1… do you need to make a template for it to give you the option to use one?

    #58325

    Oh you mean you want to create page templates. If you create a php file in your theme directory and call it mytemplate.php (you can name it anything you like as long as it’s not a built in wordpress file) then start the file with:

    Code:

    Then you can edit a page, say the About page, and you will be able to set the template to ‘My Custom Template’.

    Cheers
    Dave

    #58326
    Paesano2000
    Participant
    "davesgonebananas" wrote:
    Oh you mean you want to create page templates. If you create a php file in your theme directory and call it mytemplate.php (you can name it anything you like as long as it’s not a built in wordpress file) then start the file with:

    Code:

    Then you can edit a page, say the About page, and you will be able to set the template to ‘My Custom Template’.

    Cheers
    Dave

    Thank you a million times! Figuring this out made my life much easier haha. Thanks to everyone who replied :D
    Best.

    #58334
    apostrophe
    Participant
    Quote:
    When I refer to pages, I’m talking about the creation of pages within WordPress admin, which calls on the page.php file.
    The content of that being: <?php the_content(‘<p class="serif">Read the rest of this page &raquo;</p>’); ?>
    I want to know if there is a way I can make my own php file which then gets uploaded as the the_content.

    It looks to me like you are talking about posts not pages. Posts are served up by index.php and single.php not page.php.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Back End’ is closed to new topics and replies.