URL Redirection From Custom Type to Posts
Use a RedirectMatch in your .htaccess: RedirectMatch Permanent ^/review/(.*) /$1
Use a RedirectMatch in your .htaccess: RedirectMatch Permanent ^/review/(.*) /$1
I’ve never used is_page_template() but I have had good luck with is_page(‘new_search’) regardless of which conditional you use some things to check. Is the is_page_template(‘new-index.php’) working. you may test this by doing something like: if ( is_page_template(‘new-index.php’)) { wp_die(‘new search page’);} You should also use wp_register_style and wp_enqueue_style in your functions.php hooking in the the … Read more
Customized featured image doesn’t refresh in post admin metabox after upload/insert
Save your data in a single field as either YYYY-MM-DD or UNIXTIME. Then query like this: $args = array( ‘post_type’ => ‘POST_TYPE_NAME’, ‘meta_key’ => ‘date-key-name’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’, ); $query = new WP_Query( $args ); You should get an order, unless I am having a bad morning, of Day -> Month -> … Read more
I tried both codes and they worked for me, first I added this code add_filter(‘manage_posts_columns’, ‘bootpress_slider_columns’); function bootpress_slider_columns($defaults) { $defaults[‘featured_image’] = ‘Featured Image’; return $defaults; } and it added column both in custom post type and on posts Then I followed this link manage_${post_type}_posts_columns my post type is “slider” the below code worked for me … Read more
This is a javascript issue. on line 52: $ret .= ‘<script>jQuery(document).ready(function(){ jQuery(“#videotype”).val(‘ . get_video_field(“videotype”) . ‘) });</script></div>’; In this specific bit: .val(‘ . get_video_field(“videotype”) . ‘) The value isn’t quoted, so it’s trying to reference a variable named youtube or vimeo, which doesn’t exist, instead of a literal text value. If you add quotes it’ll … Read more
WP_Query doesn’t have child_of argument. All you can do is to add post_parent argument, but it will work a little bit different – it selects only posts with parent set to given page. (It will return only direct children, and not grandchildren of given page/post).
What makes the most sense for you to do is not to try to make covers themselves specifically show all your articles, but to make the archive page for your “Issues” taxonomy include both the cover and the articles. This is better both conceptually and practically. To to do it, I’ll assume your issues taxonomy … Read more
I think that portfolios and locations are two custom types right? In this case you have to change the slug options inside the custom type registration: register_post_type( ‘portfolios’, array( … ‘rewrite’ => array(“slug” => “/production/portfolios”, “with_front” => false), ) );
I solved this by keeping my three separate queries and building a complex system to handle paging manually. It’s not ideal, but I really saw no better way to do it.