How to switch from custom post type URL to category URL?

Your best bet will be a bunch of apache rewrite rules. Place something like this above the # BEGIN WordPress line in your .htaccess file: <IfModule mod_rewrite.c> RewriteRule ^subdirectory/(.*)$ /anotherdirectory/$1 [R=301,NC,L] </IfModule> So, using your example of redirecting /review to /reviews: <IfModule mod_rewrite.c> RewriteRule ^review/(.*)$ /reviews/$1 [R=301,NC,L] </IfModule> You can put as many rules as … Read more

Cant move file after media_handle_upload

You’re doing it twice – media_handle_upload is a wrapper for wp_handle_upload. Just use the former like so: require_once ABSPATH . ‘wp-admin/includes/file.php’; $id = media_handle_upload( ‘custom_upload’, $post->ID, array(), // Attachment post data overrides, WordPress will do all the grunt work by default array( ‘test_form’ => false, ‘action’ => ‘editpost’, ) ); if ( ! is_wp_error( $id … Read more

Generating a radius search on postmeta-metavalue and adding a taxonomy to query

Well, they say perseverance is the key… Having found a link in the RELATED questions.. https://stackoverflow.com/questions/17588525/how-to-join-post-meta-and-taxonomy-table-wpdb-mysql, I got the answer. Ok, its not using Native parameters as suggested, nor does it give excessive load times as thought (its only displaying 5 properties max in a sidebar widget). Not Everyone who asks a question here is … Read more

Custom Post Type and Taxonomies, creating the corresponding template file and loop the data

I figured out the answer, since I am registering my taxonomy as phototype I simply have to create a file named taxonomy-phototype.php and inside that I will get the data by looping like I normally would in wordpress <?php if (have_posts()): ?> <?php while (have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> <?php … Read more