$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>pages - WordPress blog posts template bug|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

pages - WordPress blog posts template bug

matteradmin7PV0评论
Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 6 years ago.

Improve this question

I'm facing an issue I've never seen before. I fully copied a WP website to my localhost machine and everything was looking fine. When I was trying to make some changes on the blog page template (that template was set to be the "posts page" on Admin > Settings > Reading), I didn't see the page template dropdown being displayed on Page Attributes box, but that weird thing is happening only on localhost, because I can see that dropdown on the online website. If I set another page else to be the "posts page" and then come back to that 1st one, I can see the page templates dropdown as normal, but this also is only happening on localhost.

I know that a specific page template is being used for posts page, however I neither can't see the page templates dropdown nor my changes on the php template page.

Is there some reported bug around that issue? I haven't updated to the 4.9 WP version yet.

Does anyone know how to fix? I need to make changes on that template and I'm stuck on the job because that issue which is giving me a big headache.

Thanks!!

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 6 years ago.

Improve this question

I'm facing an issue I've never seen before. I fully copied a WP website to my localhost machine and everything was looking fine. When I was trying to make some changes on the blog page template (that template was set to be the "posts page" on Admin > Settings > Reading), I didn't see the page template dropdown being displayed on Page Attributes box, but that weird thing is happening only on localhost, because I can see that dropdown on the online website. If I set another page else to be the "posts page" and then come back to that 1st one, I can see the page templates dropdown as normal, but this also is only happening on localhost.

I know that a specific page template is being used for posts page, however I neither can't see the page templates dropdown nor my changes on the php template page.

Is there some reported bug around that issue? I haven't updated to the 4.9 WP version yet.

Does anyone know how to fix? I need to make changes on that template and I'm stuck on the job because that issue which is giving me a big headache.

Thanks!!

Share Improve this question asked Nov 17, 2018 at 23:20 joaogdesignerjoaogdesigner 1036 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

You're not supposed to see the template dropdown when editing the Posts page, because changing the template with the dropdown wouldn't do anything.

The template for the Posts page is determined by the Template Hierarchy. When you make a page the Posts page it's no longer a Page in terms of templates. It will use home.php template if it exists, or index.php if it doesn't.

If you want the user of your theme to be able to select different templates for the Posts page, you would need to implement that yourself in a custom meta box or the Customiser.

Did you change the URLs (in two places) in wp_options table on the local system to the proper value (your local system)?

And be aware that perhaps some other values in the wp_options table may have the production URL in them that will need to be changed (due to settings in plugins or themes) on the local system. And then you'll need to change them back if you put the database back on the production site.

Although if you are just changing template code, you shouldn't need to copy the database back to production, just copy the template file. (And I assume you are using a Child Theme, so any theme updates won't overwrite things.)

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far