0

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

1 Answer 1

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.org/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.

1
  • Thanks..I have both index.php and single.php files,and the single.php file was empty,that was the issue.Thanks for the suggestion.
    – beginner
    Feb 3, 2019 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.