简体   繁体   中英

WordPress Custom Posts Page Not Displaying

I have just encountered a small but weird problem in WordPress. I have made page called 'nyheter' (translates to news in Norwegian), where I have made a custom page having a 'page-nyheter.php' in my template folder where I want to display all the posts on the website.

Please keep in mind that I don't want to display any posts on my front page.

I do also have a custom static front page that is just 'front-page.php' which works fine navigating to. However, choosing my front page as the homepage, and the 'nyheter' page as the posts page in the settings, ends up showing the homepage on the 'nyheter' page as well. All of the other pages works fine, and if I just remove the 'nyheter' page from the custom posts page, it works fine again.

What exactly am I doing wrong here? Could someone please help me?

Is the Nyheter page powered by posts? Why not use index.php since is most suitable for posts than a page template.

https://wphierarchy.com/

帖子页面将使用index.php作为其模板,静态首页将使用front-page.php

If you are a developer please enable wp_debug to true. Then check your errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM