AJAX requests within templates

Security through obscurity isn’t a good pattern to follow. You have to have a URL to make XHR or JSONP calls. Anyone who knows anything about searching the DOM using developer tools, Firebug, etc… can easily find your remote script URL. To me, this is the wrong question to ask. The more relevant question to … Read more

Is it possible to have full category-parent/post-name with custom post types? [duplicate]

Add this just below your support (or anywhere inside register_post_type array ) ‘taxonomies’ => array(‘category’, ‘post_tag’). And for 404 error, you miss to add flush_rewrite_rules(); So your final code should look like this /** add_action( ‘init’, ‘create_post_type_othercities’ ); function create_post_type_othercities() { register_post_type( ‘other-cities’, array( ‘labels’ => array( ‘name’ => __( ‘Other Cities’ ), ‘singular_name’ => … Read more

Selling Downloadable Products [closed]

your file upload limits are controlled by your php configuration (php.ini). if you’ve tried the various fixes found when searching “php increase maximum upload filesize” or similar, then that’s a question for your host. as far as hosting files elsewhere and a commerce plugin that supports that feature, I suggest having a look at Woocommerce … Read more

Exclude post formats in custom loop

$args=array( ‘paged’=>$paged, //Pulls the paged function into the query ‘posts_per_page’=> 4, //Limits the amount of posts on each page ‘post_type’=>’post_type’, //Set your allowed post types here ‘orderby’ => ‘title’, ‘order’ => ‘ASC’ ); query_posts($args); For more reference refer this. You can pass the allowed post_type array to post_type argument in arguments array.