Insert all post IDs in new database table

I have a plugin which creates a new database table. Upon activating the plugin is there a way to insert all my posts ids into that table? Right now I’m using an action hook to immediately insert the id of new posts I publish. function transfer_post_id($post_ID) { global $wpdb; if (!($wpdb->get_row(“SELECT post_id FROM $my_table WHERE … Read more

How to show only today’s post?

I want to show only today’s or current date post in my blog. Here is my code but it’s not working. <?php $day = date(‘j’); query_posts(‘day=’.$day); if (have_posts()) : while (have_posts()) : the_post(); ?> <h3><a href=”https://wordpress.stackexchange.com/questions/12152/<?php the_permalink() ?>” rel=”bookmark” title=”view: <?php the_title(); ?>”><?php the_title(); ?></a></h3> <div class=”storycontent”><?php the_content(); ?></div> <?php endwhile; ?> <?php endif; ?> … Read more

Page navigation doesn’t show when query category

Problem: when I do www.example.com?cat=4 or choose category through custom menu or from category widget it shows only first page without navigation at the bottom, where it supposed to be. It’s the same if I use index.php or category-slug.php as template. For test, when I do www.example.com?year=2012 it works. Also, www.example.com?cat=4&paged=2 works. So it must … Read more