8 posts
  • Sells items exclusively on Envato Market
  • Located in Sweden
Liren says

Regarding the “Wordpress Theme Submission Requirements” at requirement #6 under the title “WordPress Features” it states that: “index.php should be reserved for standard blog “latest posts” view.”

Currently I have built my theme using front-page.php which takes precedence over index.php for both displaying a static front page aswell as latest posts. This does not (to my mortal understanding) seem to break any of the Wordpress theme development standards/requirements. Please correct me if I’m wrong though!

So I guess my questions are:

- Will my theme be rejected by the Themeforest theme review team for using front-page.php instead of index.php for displaying the blogs “latest posts”?

- Is using front-page.php instead of index.php in some way “bad practice” and I should start doing things differently from now on?

I highly appreciate any help/advice/guidance in the matter!

Kind regards, Liren

1838 posts Don't Worry, Be Happy
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Located in United States
  • Made it to the Authors' Hall of Fame
+8 more
FinalDestiny says

Yes, it will be rejected, make a page template for the homepage while leaving the default homepage show the latest blog posts. (index.php)

8 posts
  • Sells items exclusively on Envato Market
  • Located in Sweden
Liren says

I see, I will have to make the appropriate adjustments then!

Thank you very much for your help and input!

Kind regards, Liren

8 posts
  • Sells items exclusively on Envato Market
  • Located in Sweden
Liren says

I had to revert back to this subject as it’s not totally clear for me yet.

After doing a bit more digging in the subject, (thoroughly reading the WordPress documentation), I find it quite clear that index.php is mainly used as a fallback template for when front-page.php or home.php is not present.

So it seems the only way to use index.php as the “latest posts” page, is to make sure neither the front-page.php or home.php files are present in the theme.

So just to really clarify things…

Is using the files front-page.php and home.php not allowed in themes that are submitted to Themeforest?

(...even though they are clearly fully supported (even encouraged?) by WordPress own documentation).

I don’t mean to be repetitive here, but I really would like someone to shed some light on the matter.

Appreciate any help and advice I can get!

Kind regards, Liren

1473 posts How's the surf doing?
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Had an item featured on Envato Market
  • Made it to the Authors' Hall of Fame
+6 more
tommusrhodus says

index.php is the main archives template for your theme. It is a fallback for EVERYTHING and should be used only to house your main blog loop.

https://codex.wordpress.org/Template_Hierarchy

front-page.php is not advised, you’ll have very unhappy buyers with the total lack of flexibility your theme then provides. Instead use a custom page template so that buyers have a choice of what to set as their front page.

Whether you agree with it or not, index.php should only contain your main blog loop :)

8 posts
  • Sells items exclusively on Envato Market
  • Located in Sweden
Liren says

Alright, I admit defeat!

I have now had two (far more experienced) developers tell me what to do and I would be foolish to continue to argue with you :)

Thank you so much for your advice and clarification!

Best regards, Liren

1613 posts Chris Robinson
  • Located in United States
  • Has sold $500,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
+10 more
contempoinc says

This is all you need for index.php

<?php
/**
 * Index Template
 *
 * @package WP Portico
 * @subpackage Template
 */

get_header(); 

    get_template_part('archive');

get_footer(); ?>

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by