display order of connections
Yes, there is a way to do this, since version 0.8: https://github.com/scribu/wp-posts-to-posts/wiki/Connection-ordering
Yes, there is a way to do this, since version 0.8: https://github.com/scribu/wp-posts-to-posts/wiki/Connection-ordering
Jan Fabry wrote a very useful plugin that I think it would be helpful for you to analyze your rewrite rules.
Just count the number of returned posts of the first loop: Replace: <?php query_posts( $args ); ?> With: <?php $posts = query_posts( $args ); $count = count($posts); ?>
WordPress always use the category with lowest ID. You can use plugins such as the Hikari Category Permalink plugin to change that however. http://wordpress.org/extend/plugins/hikari-category-permalink/
I was half way through writing a long answer explaining why there weren’t any … when I found one. WP Post to PDF is a plugin, updated for WP 3.3.2, that generates PDFs locally and caches them for later.
This shouldn’t be too hard! $my_terms = get_the_terms( $post->ID, ‘portfolio’ ); if( $my_terms && !is_wp_error( $my_terms ) ) { foreach( $my_terms as $term ) { echo $term->slug; } }
I built a similar feature for my personal website, that consists of a new database table, WordPress admin page and some .htaccess rewrites. Unfortunately the setup is too involved with my particular installation to be useful as a plugin, but there are plenty of URL shortener plugins available already. A quick search yields this WP … Read more
The error in the SQL statement is at the very end, SELECT * FROM c_posts WHERE id = , There is no value being supplied to check against the id column. This is most likely because you didn’t check for a blank value in the ID field before forming and executing the query. Check the … Read more
You can insert an associative array into the post_meta_field. Here is a quick little function to grab the data afterward (did not test): function grab_task_name_array($post_id) { $new_array = array(); $array = get_post_meta($post_id,’_task-name’); //do not put true as third parameter (this would return string and not array) foreach($array[0] as $key => $value) $new_array[$key] = $value; return … Read more
Chain the filters: if ( ‘include’ == $query->query_vars[‘orderby’] ) add_filter( ‘posts_orderby’, /* … */ ); And in your orderby filter use: remove_filter( current_filter(), __FUNCTION__ );