8 posts
  • Exclusive Author
  • Has been a member for 0-1 years
  • 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

1712 posts Don't Worry, Be Happy
  • Beta Tester
  • Grew a moustache for the Envato Movember competition
  • Elite Author
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 3-4 years
  • Referred between 200 and 499 users
  • Most Wanted Bounty Winner
+2 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
  • Exclusive Author
  • Has been a member for 0-1 years
  • 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
  • Exclusive Author
  • Has been a member for 0-1 years
  • 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

1174 posts How's the surf doing?
  • Forum Superstar
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • United Kingdom
  • Referred between 200 and 499 users
  • Exclusive Author
  • Has been a member for 3-4 years
+2 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
  • Exclusive Author
  • Has been a member for 0-1 years
  • 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

1579 posts Chris Robinson
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Has been a member for 5-6 years
  • Author had a File in an Envato Bundle
  • Referred between 500 and 999 users
  • Author had a Free File of the Month
+5 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(); ?>
by
by
by
by
by
by