WordPress.org

Ready to get started?Download WordPress

Forums

where does pages get its code from (5 posts)

  1. emaarkhan
    Member
    Posted 1 year ago #

    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

  2. michael.mariart
    Member
    Posted 1 year ago #

    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.

  3. govpatel
    Member
    Posted 1 year ago #

    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.

  4. emaarkhan
    Member
    Posted 1 year ago #

    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.

  5. emaarkhan
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic