[theme-reviewers] Is Blog.php is allowed in theme?

Philip M. Hofer (Frumph) philip at frumph.net
Sat Jul 5 17:03:43 UTC 2014


Just tested to make sure as well.

IF you use a home.php file AND set the settings –> reading,  posts page as one of your sub pages, it will STILL use both home.php on the index AND the posts page.  Again, not what is wanted.  So all of the ‘events’ that occur on the LANDING page are now duplicated on the page you set as the POSTS page.

Again, not what is wanted; hence the use of the blog template is necessary.

I have these three files:

front-page.php
home.php
index.php

It ALWAYS runs the home.php for both locations, also executing all events for is_home/front_page on both.

front-page.php and index.php are not even looked at for either position.  





From: Philip M. Hofer (Frumph) 
Sent: Saturday, July 05, 2014 9:46 AM
To: Discussion list for WordPress theme reviewers. 
Subject: Re: [theme-reviewers] Is Blog.php is allowed in theme?

.. chip, stop.   Learn.   a theme doesn’t have to be made with anything but the index.php, a fallback doesn’t mean “don’t do it this way'” it means that it’s the last one it checks to display if the others don’t exist, most themes do *not* have the others.



From: Chip Bennett 
Sent: Saturday, July 05, 2014 9:38 AM
To: Discussion list for WordPress theme reviewers. 
Subject: Re: [theme-reviewers] Is Blog.php is allowed in theme?

"but say the theme’s index.php is made for the home page which have things inside of which only run ON the intro-splash first page you hit," 

That is incorrect usage of index.php. The index.php template file is the default fallback for all contexts. It is NOT the site front page.

Please read these two posts:

http://www.chipbennett.net/2013/09/14/home-page-and-front-page-and-templates-oh-my/

and
http://make.wordpress.org/themes/2014/06/28/correct-handling-of-static-front-page-and-custom-blog-posts-index-template/




On Sat, Jul 5, 2014 at 11:31 AM, Philip M. Hofer (Frumph) <philip at frumph.net> wrote:

  Why would you need a sub page of a site to identify itself as is_home(), it is not the front_page or home?

  That’s the point, to put the blog posts onto a separate sub page hence the template; and not have it initiate functions that run as home.

  Again, and I will make this point a little more clear.   When you run the settings –> reading, ‘a static  page’ [ set the posts page ]  You are running the WordPress’s template hierarchy, so the the first thing it’s going to do is use the template structure of the theme;  for example, the index.php / but say the theme’s index.php is made for the home page which have things inside of which only run ON the intro-splash first page you hit, .. PEOPLE DO NOT WANT THAT;  the case-use here is that they want to move their blog posts to a sub page that is NOT a home page.

  These are people who do not just “go in and modify a theme”, these are users.  They don’t create a home.php they don’t create a front-page.php they use the theme and want to move their blog to a sub page from their home.

  If “I” were to create a front-page.php or a home.php or otherwise when people use the theme the template heirarchy uses those first when the setting is not set; which defeats the purpose of having specific functionality separated to begin with and then it cannot happen.

  And yeah, I still believe you won’t “get it”, and I have no more words to say on the subject.   It’s clear, you probably just need to experiment some more on how it works.  Or enlighten me otherwise.


  From: Chip Bennett 
  Sent: Saturday, July 05, 2014 7:40 AM
  To: Discussion list for WordPress theme reviewers. 
  Subject: Re: [theme-reviewers] Is Blog.php is allowed in theme?

  I'm not sure I follow. Why would you need the blog posts index query/context/template not be able to identify itself as such (is_home())? 

  The *blog* is the blog posts index, which should be rendered using the Home Template Hierarchy. When settings are configured properly (i.e. as defined by core), then a blog.php (i.e. a custom page template to render the blog posts index) is pointless. It will never get used, unless the Theme instructs the user to use a configuration other than the one defined by core. I really can't think of a valid use, ever, for blog.php.

  Post loops *other* than the blog posts index would use other templates.



  On Sat, Jul 5, 2014 at 8:03 AM, Philip M. Hofer (Frumph) <philip at frumph.net> wrote:

    This is missing information.   the only way for a posts loop that does not want to recognize itself as a home page from functions such as is_home or is_front_page is to use a custom blog.php file; the keyword in the article is “index template”  (unless someone can clarify)

    for example, say you have an index.php file that has a do_action(‘something’) in it and the function checks if is_front_page() go ahead and execute, you go to settings and set a page to the posts it will recognize that page as is_front_page;   so if you don’t want that (and there are reasons) then a blog.php is the only real solution

    now, that’s just my understand on how I got things to work properly for my theme;  if someone has information on the template hierarchy substitute that would be peachy.

    (mind you that is WITHOUT changing the template for the home page just not having the blog loop there and moving it to it’s own subpage)


    From: Joan Boluda 
    Sent: Saturday, July 05, 2014 4:55 AM
    To: Discussion list for WordPress theme reviewers. 
    Subject: Re: [theme-reviewers] Is Blog.php is allowed in theme?

    You're welcome! :)


    Joan Boluda
    Consultor de Marketing Online
    http://boluda.com




    On Sat, Jul 5, 2014 at 1:32 PM, Alex Lizar <lizarweb at gmail.com> wrote:

      Thanks Allot .It helped like a charm. 

      Great Weekend you too :)

      Best Regards

      Weblizar

      Follow Us: Twitter | Facebook | Google+ | Linkedin | Pinterest




      On Sat, Jul 5, 2014 at 4:38 PM, Joan Boluda <joan at boluda.com> wrote:

        Not recommended: https://make.wordpress.org/themes/2014/06/28/correct-handling-of-static-front-page-and-custom-blog-posts-index-template/ 


        On Saturday, July 5, 2014, Alex Lizar <lizarweb at gmail.com> wrote:

          Thank you Sir, 

          Can I use blog.php as a template here?

          Best Regards

          Weblizar

          Follow Us: Twitter | Facebook | Google+ | Linkedin | Pinterest




          On Sat, Jul 5, 2014 at 4:18 PM, Joan Boluda <joan at boluda.com> wrote:

            Hi Alex! 

            Home page and Front page info -> http://www.chipbennett.net/2013/09/14/home-page-and-front-page-and-templates-oh-my/

            Great weekend! :)


            Joan Boluda
            Consultor de Marketing Online
            http://boluda.com




            On Sat, Jul 5, 2014 at 12:46 PM, Alex Lizar <lizarweb at gmail.com> wrote:

              Hello all, 

              I have a confusion on blog.php ? What I want is to show my blog posts on a specific page on menu.

              And my sites home page populated using front-page.php ?

              I have gone through the reading setting option ,But could not get the solution .

              I need a solution or suggestions.

              Best Regards

              Weblizar

              Follow Us: Twitter | Facebook | Google+ | Linkedin | Pinterest


              _______________________________________________
              theme-reviewers mailing list
              theme-reviewers at lists.wordpress.org
              http://lists.wordpress.org/mailman/listinfo/theme-reviewers




            _______________________________________________
            theme-reviewers mailing list
            theme-reviewers at lists.wordpress.org
            http://lists.wordpress.org/mailman/listinfo/theme-reviewers






        -- 


        Joan Boluda
        Consultor de Marketing Online
        http://boluda.com



        _______________________________________________
        theme-reviewers mailing list
        theme-reviewers at lists.wordpress.org
        http://lists.wordpress.org/mailman/listinfo/theme-reviewers




      _______________________________________________
      theme-reviewers mailing list
      theme-reviewers at lists.wordpress.org
      http://lists.wordpress.org/mailman/listinfo/theme-reviewers




----------------------------------------------------------------------------
    _______________________________________________
    theme-reviewers mailing list
    theme-reviewers at lists.wordpress.org
    http://lists.wordpress.org/mailman/listinfo/theme-reviewers


    _______________________________________________
    theme-reviewers mailing list
    theme-reviewers at lists.wordpress.org
    http://lists.wordpress.org/mailman/listinfo/theme-reviewers




------------------------------------------------------------------------------
  _______________________________________________
  theme-reviewers mailing list
  theme-reviewers at lists.wordpress.org
  http://lists.wordpress.org/mailman/listinfo/theme-reviewers


  _______________________________________________
  theme-reviewers mailing list
  theme-reviewers at lists.wordpress.org
  http://lists.wordpress.org/mailman/listinfo/theme-reviewers





--------------------------------------------------------------------------------
_______________________________________________
theme-reviewers mailing list
theme-reviewers at lists.wordpress.org
http://lists.wordpress.org/mailman/listinfo/theme-reviewers



--------------------------------------------------------------------------------
_______________________________________________
theme-reviewers mailing list
theme-reviewers at lists.wordpress.org
http://lists.wordpress.org/mailman/listinfo/theme-reviewers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140705/78bdbc5e/attachment-0001.html>


More information about the theme-reviewers mailing list