Support » Fixing WordPress » where does pages get its code from

  • Hi,
    i am looking for code that is used for populating page.php.i think that is the page which show individual page.right? on the page.php it says
    get_template_part( 'loop', 'page' );
    I really don’t get it. does it mean its getting its code from loop.php? i want to style some page and i m unable to do that following i don’t know where the code is coming from.pls help

Viewing 4 replies - 1 through 4 (of 4 total)
  • What that function does is include a template file from your theme. In this case, it is looking for the template file ‘loop-page.php’, and if that’s not found it will look for ‘loop.php’. You should have a read through this in the codex as there’s a lot more information there, as well as with all of the other Wordprss functions.

    i want to style some page and i m unable to do that following i don’t know where the code is coming from.pls help

    loop-page.php is coded in php same way page.php is and there is no way to style the page all the styling is done in style.css and the loop code get the content from database.

    So you can style your content editor when you create a page which will be saved in database.

    Thanks it make sense. I was following a child theme video and thought perhaps styling could be controlled via loop.php but styling elements does. I have another question. The pages i have name title like About but the heading (the_title) on page should be About ABC, How do i append those words with the title of page/modify it.

    I see the comment field is still there. Is there way in loop, i can comment out comments so it doesn’t show up?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘where does pages get its code from’ is closed to new replies.