How to generate page content from database the right way?
WordPress is fetching current post for you, you have to only type to the right url. When you get e.g. to example.com/lorem-ipsum/ WordPress will load automatically post with title Lorem ipsum and display it using page.php template. Your page.php template should be looking something like that. <?php get_header(); ?> <div id=”content”> <?php while ( have_posts() … Read more