Different number of posts on the front page

There is a post_limits hook that you can use for this purpose exactly: // in homepage show 6 posts add_filter(‘post_limits’, ‘homepage_limits’ ); function homepage_limits( $limits ) { if(is_home() ) { return ‘LIMIT 0, 6’;; } return $limits; }

How to show only today’s post?

This should do the trick: <?php $day = date(‘Ymd’); query_posts(“m=$day”); The query arg ‘m’ for WordPress will be interpreted as a year if it is four characters long, a month if 6, and a date if 8. EDIT You should probably add in the original query string just in case you’re writing enough to need … Read more

Multiple instances of Featured Image Query

For both loops move <a href=”https://wordpress.stackexchange.com/questions/67673/<?php the_permalink(); ?>”> To after while ( $the_query->have_posts() ) : $the_query->the_post(); the_permalink() is template tag and as such generates what it does, based on global $post variable. In your custom loop it doesn’t contain the post you want until after $the_query->the_post() call.

Page navigation doesn’t show when query category

I found a partial workaround. Since the query object in the index.php is the right one I transferred it using serialize to template of choice, in this case category-video.php. In index.php i put on top <?php $s = serialize($wp_query); file_put_contents(‘query’,$s); ?> and in category-video.php I put <?php $u = file_get_contents(‘query’); $wp_the_query = unserialize($u); ?> It’s … Read more

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