Store records for a table in wordpress

You could use the WP-Table-Reloaded Plugin: http://wordpress.org/extend/plugins/wp-table-reloaded/ Screenshots are on the plugin author’s website: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/

WordPress Custom Content and Taxonomy’s Archives

Firstly, the ‘future’ status is for posts that are not yet published and should not be used to mark events that occur in the future. (I would recommend storing the event’s data in the post meta, and then query/order by that post meta field. See this question and this question) Secondly, in your code you … Read more

How can I set a default category for a custom post type in wordpress?

The problem with ‘save_post’ is that it gets called when you actually change something on the post edit page, if you just click the update button without changing anything, it doesn’t get called. So, i would say use ‘pre_post_update’ action hook instead of ‘save_post’ or use both. Also for debugging try put some test code … Read more

PHP get the first post separately from array returned by wpdb->get_results()

once you have set of result in particular order you can achieve it simply as below : – $pageposts=$wpdb->get_results(” SELECT * FROM $wpdb->posts WHERE post_type=”post” AND post_status=”publish” ORDER BY post_date DESC LIMIT 6 “, OBJECT); First time $i=1; foreach($pageposts as $pageposts_first){ //here goes your first post if($i==1) break; } For rest of posts $i=0; foreach($pageposts … Read more

How to make “more” or “continue reading” links on excerpts nofollow?

In your theme’s functions.php: /* Returns a “Continue Reading” link for excerpts, with ‘nofollow’ set */ function your_theme_continue_reading_link() { return ‘ <a href=”‘. get_permalink() . ‘” rel=”nofollow”>’ . ‘<span class=”meta-nav”>&rarr;</span> Continue reading</a>’; } /* Replaces “[…]” (appended to automatically generated excerpts) */ function your_theme_auto_excerpt_more( $more ) { return ‘ &hellip;’ . your_theme_continue_reading_link(); } add_filter( ‘excerpt_more’, … Read more

How to create a linked tag list in my sidebar

This will output a list of all tags, sorted by the most used tag first. Each tag has the number of times it has been used following the tag in parentheses. The parentheses and number of times used is in a <span>. To remove the parentheses, change <span>(‘ . $tag->count . ‘)</span> to <span>’ . … Read more