[theme-reviewers] Make change on my unapproved theme

Chip Bennett chip at chipbennett.net
Thu Jul 18 19:16:06 UTC 2013


The easiest route is to add conditional output in front-page.php:

if ( 'page' == get_option( 'show_on_front' ) ) {
    // Original front-page output here
} else {
    // Normal loop output here
    // You can get_template_part( 'loop' ) if you use loop.php,
    // or, you could use get_home_template()
}


Alternately, you could rename your featured-content template file as
template-featured.php, and give it a proper custom page template "Template
Name:" header, then do something like:

if ( 'page' == get_option( 'show_on_front' ) ) {
include( get_page_template() );
} else {
include( get_home_template() );
}


Then, the user would just have to assign that page template to the page
assigned to display the site front page.


On Thu, Jul 18, 2013 at 6:37 AM, nan at designpromote.co.uk <
nan at designpromote.co.uk> wrote:

> Hi
>
> Ticket: #13151 http://themes.trac.wordpress.org/ticket/13151
> Recommendation: It seems that the front-page.php is designed to be the
> default home page and not as a template. If that is the case then it should
> must facilitate the showing of the blog feed if the user selects "Front
> page displays Your latest posts". If its meant to be a selectable template
> to be used in conjunction with the setting: "Front page displays A static
> page" then it should be renamed to something other than front-page.php
>
> First, thanks for ZGani's review and time.
>
> My theme as above is not approved and I am making changes in line with
> ZGani's feedback.
>
> My theme use pages mainly as it aims to the restaurant business as name
> suggested. I use front-page.php as the home page (loading page or
> template). I can do one of changes as following:
> 1. Change name simply
> 2. or in functions.php, created a loading page, set it as the front page
>
> Please help to confirm which way I should choose
> or any other better solutions please?
>
> Regards,
>
> Nan
>
> _______________________________________________
> 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/20130718/d4c4a086/attachment.html>


More information about the theme-reviewers mailing list