How could I create a ‘private comments’ section on a custom post type?

Comments have an associated author to them. In a section called “Private Comments” – Query for all comments belonging to the current post where wp_comments->comment_author_email equals the email of the current user. Checkout the wp_comments table. It has 15 or so fields you can filter when displaying comments. EDIT: The code would look something like … Read more

Timepicker-addon doesn’t show – Datepicker works fine?

Figured out that I needed to have the right js dependencies declared. This code now works. Hope it helps someone else with the same problem. Key line array(‘jquery-ui-core’ ,’jquery-ui-datepicker’, ‘jquery-ui-slider’) Full `wp-enqueue’ code: function pbd_events_jquery_datepicker() { wp_enqueue_script( ‘jquery-ui-datepicker’, get_bloginfo(‘template_directory’) . ‘/jquery-ui-datepicker/jquery-ui-1.8.16.custom.min.js’, array(‘jquery’) ); wp_enqueue_script( ‘jquery-ui-timepicker-addon’, get_bloginfo(‘template_directory’) . ‘/jquery-ui-datepicker/jquery-ui-timepicker-addon.js’, array(‘jquery-ui-core’ ,’jquery-ui-datepicker’, ‘jquery-ui-slider’) ); wp_enqueue_script( ‘pbd-datepicker’, get_bloginfo(‘template_directory’) … Read more

How can I show recent posts from same taxonomy as the post currently being viewed?

Have you tried using get_the_terms()? Quick-and-dirty, from your code example: <?php global $post; $terms = get_the_terms( $post->ID, ‘some-term’ ); foreach ($terms as $category) : ?> <h3>More News From This Category</h3> <ul> <?php $posts = get_posts(‘numberposts=20&category=’. $category->term_id); foreach($posts as $post) : ?> <li><a href=”https://wordpress.stackexchange.com/questions/39455/<?php the_permalink(); ?>”><?php the_title(); ?></a></li> <?php endforeach; ?> <li><strong><a href=”<?php echo get_category_link($category->term_id);?>” title=”View … Read more

Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks

If you’re running WordPress 3.0.1 or later, I believe your problem lies with the ‘post_type_link’ filter declaration and function arguments. When the ‘post_type_link’ filter is applied, it passes the following 4 arguments: apply_filters(‘post_type_link’, $post_link, $post, $leavename, $sample); But your function accepts $post_link and $id. Try the following adjustments: function custom_post_link( $post_link, $post ) { if … Read more