Update post date to modified date automatically

Doing what you ask is remarkably easy. function reset_post_date_wpse_121565($data,$postarr) { // var_dump($data,$postarr); die; // debug $data[‘post_date’] = $data[‘post_modified’]; $data[‘post_date_gmt’] = $data[‘post_modified_gmt’]; return $data; } add_filter(‘wp_insert_post_data’,’reset_post_date_wpse_121565′,99,2); I answer with hesitation though. As in my comment, if you are using dates in your permalinks you will generate broken links every time that post_date changes. The real problem … Read more

Query not returning CPT posts

I had a similar problem and posted the solution here: http://wordpress.org/support/topic/role-scoper-updating-query_posts query_posts causes the main WP_Query to be discarded. That may or may not be the behavior you want. If no, you need to update WP_Query, then you could update your functions.php file to include a register filter that displays your content types as part … Read more

Get post info inside modal window?

It would appear your use of Thickbox is the culprit. When opening a thickbox via the anchor, the thickbox parameters must always be last, else the other parameters will be removed, e.g. your movies Post ID http://devll.wordpress.com/2009/10/01/jquery-iframe-thickbox-removes-parameter/ Firstly, your use of queries is incorrect, what’s more you never tell your query which post to look … Read more

archive-{$post_type}.php not loading. instead the default archive.php loads

Category archive pages do not use archive-{$post_type}.php type templates. Instead they use category-{$category->slug}.php, category-{$category->term_id}.php, category.php, archive.php or index.php depending on the first available template in the hierarchy. An easy fix would be to just make a copy of archive-{$post_type}.php and renaming it to category.php. WordPress will automatically use this template when youn visit a category … Read more