Author template – separate custom post type by custom taxonomy term for $curauth

Got the answer, encase anyone else needs it, here it is. <?php $currauthor_id = get_the_author_meta(‘ID’); $terms = get_terms(‘your_taxonomy’, array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hide_empty’ => 1, ) ); foreach ( $terms as $term ) { $myquery = new WP_Query( array( ‘author’ => $currauthor_id, ‘post_type’ => ‘post_type_name’, ‘your_taxonomy’ => $term->slug, ‘posts_per_page’ = > -1, … Read more

template page to show custom a post types only

From what I can understand of your snippet post retrieval is implemented by get_posts($cat_post_args) call and so results are controlled by $cat_post_args arguments. To add post type limitation to it you should add post_type argument to that array. See documentation on get_posts() and WP_Query (used internally and documents available argument more thoroughly).

Creating Multiple Admin Widget Page with Calling One Sidebar

Your code deletes keys from widgets. One of those keys is named ‘class’. When WordPress looks for the ‘class’ key it is missing and PHP reports that. I think you want this: $groups_sidebars = array(); foreach ( retrieve_widgets() as $widget ) { if ( array_key_exists( ‘groups-sidebar’, $widget ) ) $groups_sidebars[] = $widget; } $wp_registered_sidebars = … Read more

post in a lightbox?

Your code cannot work. At first, your endwhile; and endif statements are inside the string. They will be printed and not executed. The correct formatted code should look like this $hotfoodpresent = get_posts( array(‘post_type’ => ‘st_notice’, ‘posts_per_page’ =>-1) ); if ( $hotfoodpresent ) echo ‘<a class=”lbp-inline-link-1 cboxElement” href=”#”></a> <div style=”display: none;”> <div id=”lbp-inline-href-1″ style=”padding:10px; background: … Read more