$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'); ?>single post showing blank page in custom template|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)

single post showing blank page in custom template

matteradmin9PV0评论

I have converted an html template.In that Single pages are showing up but single post are not displaying anything other than a blank page.How to fix this.Can anyone help me with this?content from pages are showing up.but not single post's. I tried changing permalinks but no change. Thanks

I have converted an html template.In that Single pages are showing up but single post are not displaying anything other than a blank page.How to fix this.Can anyone help me with this?content from pages are showing up.but not single post's. I tried changing permalinks but no change. Thanks

Share Improve this question edited Feb 3, 2019 at 4:10 beginner asked Feb 3, 2019 at 3:42 beginnerbeginner 1672 silver badges10 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

For help with a template (which displays post/page content) that works with your theme, make a copy of the single.php file in your theme's folder. That is the basis for how WP displays a single page.

But....

You need to understand/learn how WP generates pages. It is all done through template files, which are files that contain the PHP and HTML code to generate the HTML. There are no HTML pages (basically) that are used by WP themes. There are templates that query the database and produce HTML output according to the code in the template.

Start by looking here https://developer.wordpress/themes/basics/template-files/ , which is also the tutorial for how themes are built and work.

Understanding how templates work to display pages is an important part of learning how WP works. You can use the information in the link, plus the copy of the single.php from your theme, to understand how your theme displays a single page.

And, it's always best to use Child Themes, not modify your theme's files. If you modify your theme's files, then your changes will go away with a theme update. Check out Child Themes in via the above link.

Post a comment

comment list (0)

  1. No comments so far