Modify Profile Biographical Info Field

thanks @toscho A quick tweak on toscho’s Remove Bio Box code add_action( ‘personal_options’, array ( ‘T5_Hide_Profile_Bio_Box’, ‘start’ ) ); /** * Captures the part with the biobox in an output buffer and removes it. * * @author Thomas Scholz, <[email protected]> * */ class T5_Hide_Profile_Bio_Box { /** * Called on ‘personal_options’. * * @return void */ … Read more

Noob Loop Question

If you want to check the number of posts on each page, you can use the found_posts method of WP_Query : <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $portfolio = new WP_Query(array(‘post_type’ => ‘project’, ‘posts_per_page’ => 12, ‘paged’ => $paged)); if ($portfolio && $portfolio->found_posts >= 2) : while ($portfolio->have_posts()) : $portfolio->the_post(); echo “<div>”; the_title(); … Read more

Display one result for category post type

Did you create taxonomy-{your-slug}.php template ? let’s say the slug is ‘locations‘ so, it will be something like this taxonomy-locations.php if you haven’t created yet, create one and the template codes will look like this , <?php /** * Locations taxonomy archive */ get_header(); $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); … Read more

Upload image from other server without resize?

Have a look at media_handle_sideload in source. The function within there that generates the intermediate sizes is wp_generate_attachment_metadata. If you just want to upload the file, you can use the wp_handle_sideload function directly and bypass the meta data and attachment generation.