Joy
(@joyously)
Themes are generic and must handle all content that the user writes, not just certain ones (about, contact). See the Template Hierarchy for which templates handle the various requests. That means that page.php has to handle any Page written, not just the About page.
Put your specific About content into a WordPress Page in the editor, and the page.php should display it, just like it displays any other Page, like Contact. The front-page.php should handle both choices of static page or latest posts on the home page.
Most people use a plugin (with a shortcode or a block) for the Contact page, so that they can either save the information or have options of who it is sent to.
Theme Developer Handbook
I tried to add the text and code in the text editor. and publish the page. But it shows me only the header and footer. Not the text which I added in text editor. I think maybe some functions or files are missing.
Joy
(@joyously)
Don’t put code in the WordPress editor.
If your theme isn’t calling the_content(), then you won’t see it. The theme does all the work of showing the content from the database, but it is generic so that it works with all pages.
Read the Theme Developer Handbook.
how can I solve this issue? Can you please help?
Joy
(@joyously)
No, I can’t write the theme for you. There are thousands of themes that you could use and just put the content into the editor, like most people do, and perhaps some Additional CSS (in the Customizer) to make it look like the original.
Since you don’t understand how to write a theme, I suggest you pick one that is close and customize it.
Okay, thanks for suggestions and help. Really appreciate it.