My theme is on [ Soft Rejected ] and says this:
Reason: index.php should be reserved for default blogroll and if there is no static page being set as front page, it should display the blogroll on homepage. You can use a custom page template for homepage.
I dont really understand because I always have done that file “index.php” in this way and put home.php as homepage.
if someone could comment me about how I can resolve this problem would. I appreciate your help.
<?php wp_link_pages( ); ?> <div id="post-<?php the_ID(); ?>" post_class="">> <?php comment_form(); ?> <?php add_theme_support( 'custom-background'); ?> <?php add_theme_support( 'custom-header' ); add_theme_support( 'automatic-feed-links' ); ?> <?php language_attributes(); ?> <?php the_tags() ?> <?php dynamic_sidebar( ); ?> <?php body_class( ); ?></div>
As the reviewer said – and part of the WordPress submission guidelines and generally fair policy – you should not use index.php to enforce a homepage template on your users. Think of index.php as being the mother of all templates, the backbone in the skeleton of WordPress. You overwrite it, nothing functions properly for a user that won’t care too much of your fancy schmancy homepage template. Without page.php, single.php, archives, categories etc, templates defined, all those queries revert to index.php for display and encounter… a homepage layout for every page.
If you really want to enforce a preferred look on the homepage in your theme, use the proper template name in the hierarchy recommended by WordPress Codex: front-page.php
front-page.php will always take precedence over index.php in terms of site homepage display (not blogroll) and will not affect/interfere with other pages requesting index.php for displaying proper information structure.
Thanks kailoon, just trying to help out.
Thank you very much dear Alex for your help, I will review these documents and then well you commented as I was, I think there is the solution.
thank you very much for your help
well thank you very much to kailoon for his constribucion
Sorry for bringing back an old post. I was also curious about this policy.
Taken from the guidelines document: index.php should be reserved for standard blog “latest posts” view.
If this is in fact the rule front-page.php would not be allowed because this would take precedence over index.php for the latest post option.
Could someone clarify this? It doesn’t make since to say index.php must be used if front-page.php is allowed.
You got it wrong. Both index.php and front-page.php are default templates in WordPress, part of the basic template hierarchy of WP. The rules don’t tell you that you only allowed to have a blog-like homepage. You are allowed to use whichever one your theme needs, but you MUST use them for their appropriate roles. front-page.php is basically a PAGE template, the one that would take priority as HOME over any other page/archive, while index.php should ONLY be used for the archiving roles. That said, you should not modify INDEX in order to display a static page that becomes home page. Why? Because a lot of other templates deeper in the hierarchy inherit the index.php code unless you create special templates for them ( archive.php, category.php, search.php, single.php, page.php and so on). Keep index for archiving, front-page. for or a custom tpl-homepage.php for your home and you should be safe.