Search by author in WordPress

<?php if(!is_search()){ get_template_part( ‘loop’, ‘index’ ); }else{ echo ‘<div><h1>Resultados de B&uacute;squeda:</h1></div>’; if(isset($_GET['author'])){ $postsAuthor =”; $searchAuthor = $_GET['author']; $postsAuthor = $wpdb->get_col( $wpdb->prepare( “SELECT id FROM $wpdb->users    WHERE display_name LIKE %s”, ‘%’.like_escape($searchAuthor).’%’ ) ); if($postsAuthor){ query_posts(array( ‘author’=>implode (‘,’,$postsAuthor),’post_type’ => array( ‘fotos’, ‘videos’), … Continue reading

Good way to be a master with wordpress CPT

An awesome tutorial, it shows up an excelent workflow about the steps you need to follow to create CUSTOM POST TYPES… and how to integrate more the CPT to wordpress back-end. http://wp.tutsplus.com/tutorials/widgets/using-custom-post-types-to-create-a-killer-portfolio/