Wordpress Static front page on all themes - wordpress

I recently noticed some wordpress themes don't support custom static front pages instead of the blog page.
For example: The theme "Twenty Eleven" https://fuc.wordpress.org/themes/twentyeleven/
Is it possible to change that?

Yes it's possible.
Make a page name front-page.php in the theme's folder and then in Wordpress Admin Settings change the frontpage from "Your latest posts" to Static Frontpage.
Documentation Here:
https://codex.wordpress.org/Creating_a_Static_Front_Page

Related

Build a child theme to display a static page as site’s front page in a wordpress multisite environment

The use case is to show a customized theme with a static page as front page when a new site is created in a multisite installation.
I tried with starter content but it is seems that the feature is not yet supported https://core.trac.wordpress.org/ticket/38624

Custom wordpress theme template page is not public

I am new to wordpress. I have made a custom wordpress theme and have added a few page templates to it, that I have used on different pages. Now the issue is that When I deploy the website on the server the the pages are not public (i.e. the user is asked to enter the username and password before he/she can visit the page). Although I have made them public in the edit page section, but they are still not public. When I change the theme and use any of the default WP themes the pages are public. Need some help in this regard.
Thanks.
If it works with the default theme and not yours, its definitely a theme issue, do you have a link to your site or a link to the theme you are using?

How does Wordpress route index.php when a front-page.php is present in the theme?

I just set up a wp theme featuring a front-page.php.
When I point my browser to http://mydomain.com/ the front-page.php is loaded. That's ok.
But... which URL will now trigger the index.php template?
Thank you in advance for your feedback.
Matteo
index.php is the main file for the theme. It contains the code for the Main Area (below header & above footer) and will specify where the other files will be included.
Your site may be loading front-page.php because you may have set static page in your settings to be shown as home page.
Acording to wordpress official doc:
index.php
The main template. If your Theme provides its own templates, index.php must be present.
front-page.php
The front page template, it is only used if you use a static front page.
home.php
The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.
See this Link for more details on wordpress template hierarchy: WordPress Codex « Theme Development « Template File List
Having said that, mention your site URL in question and may be I can help you more.

How to have my page templates in sub folder Wordpress?

I am using a child theme. In the child theme I would like to have a subfolder for all my page templates, e.g. homepage-template, default-template, etc in /templates. How can I do this so that wordpress admin menu can still see them when I choose a template for a page?
Can you upgrade to WordPress 3.4? This is a native function of 3.4.
See: http://nacin.com/2012/03/29/page-templates-in-subdirectories-new-in-wordpress-3-4/
Create a folder with the name page-templates in your theme folder.
If you have already published pages with templates before having them under this sub-folder, you have to reselect the template page for these pages and click update.

redirecting main blog url

If I have a wordpress blog, is it possible to have the main url to redirect to a basic HTML page, while keeping the permalinks still displaying the blog posts within a wordpress theme?
Set your front-page to a custom (static) page (Settings -> Reading in WP 2.8)
More info here

Resources