Better to use a post type archive, page template, or shortcode for generating a highly configurable CPT archive?

I’m posting my comment to @MarkKaplun as part of my answer. My point is this, every end user experience a certain thing in a certain way based on his/her own knowledge, experience, usability and personal preference. There can never be a wrong or right answer here. Option one might suite you best, option two might … Read more

Use WP_Query object inside a function

This is basic PHP. Just a note before I continue, never ever globalize variables. WordPress has already done quite a crappy job regarding this. Globalization is evil, because anyone and anything, knowingly or unknowingly can change a global variable. This makes globals a nightmare to debug. So in short, NEVER EVER globalize. Whenever you need … Read more

Passing Variable as URL Parameter — Security concerns?

Passing non-private/non-protected/non-sensitive values through the URL is quite widely used and a more reliable way of passing values from one page to another. The reason for this is, $_SERVER[‘HTTP_REFERER’] is totally unreliable and can never be trusted. It can also, in many case be an empty value. Check the two following posts for more details … Read more

Author archive only for custom post type

According to this blogpost you just need to add the following code to your themes functions.php or in a plugin: /* Add CPTs to author archives */ function custom_post_author_archive($query) { if ($query->is_author) $query->set( ‘post_type’, array(‘custom_type’, ‘post’) ); remove_action( ‘pre_get_posts’, ‘custom_post_author_archive’ ); } add_action(‘pre_get_posts’, ‘custom_post_author_archive’);