Forum Replies Created
-
AuthorPosts
-
August 20, 2015 at 3:32 pm in reply to: 'orderby' and 'order' ingored in genesis_custom_loop #163046lagomdesignMember
Found it.
Sorry for the trouble, and thanks again for the work!
By the way … is there a reason to use echo over print?
August 20, 2015 at 3:19 pm in reply to: 'orderby' and 'order' ingored in genesis_custom_loop #163045lagomdesignMemberThanks for you work, brad.
There must be something else in my code somewhere, 'cause that still ain't working. I'm going to have to start parsing thru other files to make sure there's no filters at work that I don't know about.
August 20, 2015 at 2:09 pm in reply to: 'orderby' and 'order' ingored in genesis_custom_loop #163041lagomdesignMemberI think print() looks better in the code. No difference in performance.
Here's the relevant part of the page template.
//* Add custom loop to list all Communities add_action( 'genesis_after_loop', 'foundation_do_community_loop', 11 ); function foundation_do_community_loop() { //* Remove floorplan filter remove_action( 'genesis_after_entry', 'foundation_community_filter' ); $args = array( 'post_type' => 'rh_community', 'posts_per_page' => 10, 'orderby' => 'rand' ); //* Add column classes add_filter( 'post_class', 'foundation_loop_classes' ); //* Remove the entry meta in the entry header remove_action( 'genesis_entry_header', 'genesis_post_info', 5 ); //* Add the featured image before post entry add_action( 'genesis_entry_header', 'foundation_community_image', 5 ); //* Add extra info after the title add_action( 'genesis_entry_header', 'foundation_community_info', 12 ); //* Add permalink button after entry add_action( 'genesis_entry_content', 'foundation_permalink_button', 15 ); //* Remove the entry meta in the entry footer remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); remove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); print( '<div class="communities">' ); genesis_custom_loop( $args ); print( '</div>' ); print( '<div class="communities">' ); $comms = get_posts( $args ); print( '<ul>'); foreach( $comms as $com ) { printf('<li>%s</li>', apply_filters('the_title', $com->post_title ) ); } print( '</ul>' ); print( '</div>' ); }
lagomdesignMemberWell, figured it out. Had to add the pagehook that's passed via the do_action. So …
function foundation_cpt_header_image( $pagehook ) { add_meta_box( 'genesis-cpt-archives-image', __( 'Header Image', 'genesis' ), 'foundation_cpt_header_meta', $pagehook, 'main' ); }
gets the metabox to show up.
lagomdesignMemberThanks Ryan.
I think the 'genesis_entry_footer' is only for HTML5-compatible themes, which Education isn't currently. I went ahead and dropped that in, and it didn't kill the post_meta.
The XHMTL-HTMS5 change doesn't explain why the 'footer_creds_text' filter ins't working either.
Weird.
lagomdesignMemberI'm actually having a similar problem with the Education Theme. I cannot get many elements to remove using the normal methods. For example, adding
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
has yet to remove the post_meta. I've tried it on a Custom Post Type archive page. For kicks I put in the theme's functions.php. But no effect anywhere.
I feel your pain, billmcq. -
AuthorPosts