Page no: P57
Table of contents
This is the actual plugin we developed: Pictured Category Archives
Developer’s feedback
The specification looks good. it is possible to be done in that way.
Tips & Tricks
With one simple function attached to the custom_post_author_archive hook, we can easily show both pages and authors on author archive page.
function custom_post_author_archive( &$query )
{
if ( $query->is_author )
$query->set( ‘post_type’, array(‘page’, ‘post’) );
remove_action( ‘pre_get_posts’, ‘page’ ); // run once!
}
add_action( ‘pre_get_posts’, ‘custom_post_author_archive’ );
Tags: Plugin Pictured Category Archives, Sahifa
See more for