How to filter out post type meta?

I have used this code to filter out the post type and it works fine when showing filtered results: add_filter(‘wpseo_title’, ‘vehicle_listing_title’); function vehicle_listing_title( $title ) { if ( ‘vehicles’ != $post->post_type ) { $location = get_the_terms($post->ID, ‘vehicle_location’); $model = get_the_terms($post->ID, ‘vehicle_model’); $title=””; if($model && $model[0]) $title .= $model[0]->name . ‘ used’; else $title .= ‘Used’; … Read more

Order WordPress Custom Taxonomy Pages & Pagination Not Working

I’m using this code to enable custom post types and taxonomies on my site (I’ve also included this below to save linking out) https://gist.github.com/kasparsd/2924900 The code works great for the most part, however I’m having issues with 2 things: I would like to order the posts on the archive pages using the title – at … Read more

what tables uses wp_get_post_terms

I have a (uncommented) legacy code that is using wp_get_post_terms function, and always returns WP_Error (Invalid Taxonomy). The calling of the function is: $location = wp_get_post_terms($post_id, “location”); I had been inspecting the database, and the first conclusion is that in the table wp_term_taxonomy there are many entries with “location” into taxonomy field. So I have … Read more

Custom Taxonomy Creates Unwanted Integer Terms on Post Save

After I select terms and then save my custom post type, new taxonomy terms are generated with integer values and selected every time. I don’t know what the problem is, nor have I found any sort of the same issue anywhere on the internet. Here is a picture of what exactly is going on: http://prntscr.com/fvfqvf … Read more

Disable WordPress Recognizing Path as Attachment

Whenever you enter an URL with two path segments that doesn’t exists, WordPress will automatically parse the query as an attachment. How to reproduce Change you permalink structure to /%postname%/. Enter the following path behind your WordPress root URL: /foo/bar make sure “foo” isn’t a existing taxonomy or post type. Hook into pre_get_posts and dump … Read more