- This topic has 7 replies, 4 voices, and was last updated 4 years, 3 months ago by
Elvin.
-
AuthorPosts
-
December 13, 2021 at 1:22 pm #2047913
Tri Ryuzaki
Hello, please instruct me to set a single blog post as homepage (front page) similar to this website: https://www.vpnmentor.com/. Thanks
December 13, 2021 at 3:42 pm #2048032David
StaffCustomer SupportHi there,
believe it or not – its NOT actually possible with WordPress – you can only set a static Page ( or the latest posts ) on your home page.
There may be some bright spark on Stack Overflow that has a workaround but there is no official way to do this.
December 13, 2021 at 4:11 pm #2048071Tri Ryuzaki
As I checked, they (https://www.vpnmentor.com/) are using WordPress, so there must be a way somehow
December 13, 2021 at 4:45 pm #2048092Ying
StaffCustomer SupportHi there,
How do you know that site is using WordPress, as it looks to me, Not a WordPress site.
You can tell by the
bodyelement, there’s not single WordPress class in it.
https://www.screencast.com/t/ttUViJcmm6JuDecember 13, 2021 at 5:56 pm #2048133Tri Ryuzaki
So you need to learn more, here are 4 ways to prove:
– Method 1: ctrl + shift + I –> search for “theme”, result below:
https://imgur.com/89zhMyn– Method 2: Use wordpress checking site: https://www.isitwp.com/, result below
https://imgur.com/dyqcu9h– Method 3: Ctrl + U (View page source), you can see a lot of “wp-content”:
https://imgur.com/kjDElXl– Method 4: Just go to: https://www.vpnmentor.com/wp-admin
Happy now? Btw your statement does not help solve the case in any way
December 13, 2021 at 8:41 pm #2048196Elvin
StaffCustomer SupportHi there,
This is possible but only through a hacky way w/ snippets or through child theme templating.
You can set the homepage as the default blog page and then set the post per page to 1. This technically displays a post on the home page but this doesn’t literally make the single post page THE home page.
Alternative #2 is by doing a template redirect like here:
https://bavotasan.com/2015/single-post-as-home-page-in-wordpress/#:~:text=Redirect%20the%20templateBut again, what this does is it redirect the visitors from the actual front page to a post. This doesn’t make a post THE front page.
Alternative #3 is, you can write your own front-page.php on a child theme to contain a query for just 1 post.
It’s similar to #1 and I think this is what your reference site is doing because the page itself is a bit broken because if you inspect, all the usual parts generated by WordPress are missing. (body tags having empty classes)Alternative #4 is through plugins like this – https://wordpress.org/plugins/mpress-custom-front-page/ which employs the same idea I’ve mentioned in #2 if you look at its codes – https://github.com/wpscholar-wp-plugins/mpress-custom-front-page/blob/master/mpress-custom-front-page.php
Note: This particular issue is with WordPress core itself rather than the theme’s. A theme can only follow what the core does. The rest are niches and this particular one is very rare to include as a feature request. It’s also out of scope as it’s a custom development not just of the theme’s but WordPress default behavior itself.
December 13, 2021 at 9:13 pm #2048208Tri Ryuzaki
Hi Elvin, thank you very much for your helpful & relevant reply, I’ll definitely try them all.
December 13, 2021 at 9:17 pm #2048211Elvin
StaffCustomer SupportYou can find more variation of this if you search the web.
All of them mostly employ similar logic. You just need to find the one that fits what you exactly need.
No problem. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.