Hot answers tagged

4

Even if you will keep your content static, you must create the pages through wp-admin. It's the right and easiest way. After that, you have some options of how you will keep your content static: Page template You'll create a file into your theme folder with your static content, starting with this piece of code inside PHP tags: /* Template Name: Enter your ...


2

WordPress has some nifty functions which do this for you. You'll need some experiences with HTML, CSS, PHP to style the output and understand what these functions do but the functions you're looking for are: the_date() which displays the post date. the_author() which displays the author of the post. In your theme will most likely be a page.php template ...


1

I use the following for multiple post types, just replace foo and bar with your own post types: $args = array( 'post_type' => array( 'foo', 'bar' ), 'orderby' => 'post_date', // other parameters as needed ); $q = new WP_Query( $args ); if ($q->have_posts()) : while ...


1

Solved I've solved the problem and I'm going to share the code I used, so other developers that have this issue too can cope with it. The get_pages()-function accepts the "hierarchical" argument. By default it's set to 1 (true), which means, that Wordpress searches the pages in hierarchical order to find the other parameters. If - as in my case - you ...



Only top voted, non community-wiki answers of a minimum length are eligible