Trying to list out child pages with WP_Query

I tested the query and it does work so the only thing I can spot that is misleading but not right is directly after you while() statement you have the_post(). This doesn’t work in secondary queries, it should look like: <?php if( $subpages->have_posts() ) : ?> <?php while( $subpages->have_posts() ) : $subpages->the_post(); ?> … <?php … Read more

Featured Images on Front Page

Two categories should do the trick. Featured posts – This category should be applied to posts that you want to show on your home page, with that images grid. You can limit the number of posts (so only the, for example, 6 newest ones would appear) and select the featured image for them on each … Read more

Posts archive index pagination in a static page custom query

When you perform a custom query such as this one, you have to do a bit of a “hack” to get pagination to work properly. Change this: <?php query_posts( “category_name=news&orderby=date&order=ASC&posts_per_page=2” ); ?> …to a WP_Query call: <?php $news_query = new WP_Query( “category_name=news&orderby=date&order=ASC&posts_per_page=2” ); ?> And then you need to *move your custom query object into … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)