Community Forums › Forums › Archived Forums › Design Tips and Tricks › genesis_custom_loop vs genesis_grid_loop: How to format posts?
Tagged: format, genesis_custom_loop, post
- This topic has 2 replies, 2 voices, and was last updated 11 years, 2 months ago by travlanders.
-
AuthorPosts
-
September 23, 2013 at 11:38 pm #63937travlandersMember
Hi,
New to Genesis and trying to work out some kinks...
I am fairly familiar with things but I may slip up so help with my lingo, thoughts if you can please....
I want to list certain posts based on metadata so I am using genesis_custom_loop
genesis_custom_loop( array( 'meta_key' => '_fb_count', 'orderby' => '_fb_count', 'order' => 'DESC' ) );
This works great... returns what I would expect... Cool...
My question comes from moving from a genesis_grid_loop to this new genesis_custom_loop...
My old code used the genesis_grid_loop and I was able to have limited control over how the posts looked:
genesis_grid_loop( array( 'features' => 0, 'feature_image_size' => 0, 'feature_content_limit' => 0, 'grid_image_size' => 'previewImage', 'grid_image_class' => 'alignleft post-image', 'grid_content_limit' => 250, 'more' => __( '[Read more]', 'minimum' ), ) );
I could pass in these args and manipulate features or image size, etc...
How can I manipulate how the posts look using a genesis_custom_loop?
What args can I pass it?I tried something like:
genesis_custom_loop( array( 'features' => 0, 'feature_image_size' => 0, 'feature_content_limit' => 0, 'grid_image_size' => 'previewImage', 'grid_image_class' => 'alignleft post-image', 'grid_content_limit' => 250, 'more' => __( '[Read more]', 'minimum' ), 'meta_key' => '_fb_count', 'orderby' => '_fb_count', 'order' => 'DESC' ) );
But everything was ignored regarding style...
Ultimately I would like to be able to add a facebook like button somewhere within each post. I am thinking next to the comments... How can I did into that area? Hook into it?Any help is greatly appreciated!!
Thanks,
Travisps- if you head to the url you can see my site... really i am not sure if it is helpful for this question though...
http://thefrankenstoryproject.com/November 20, 2013 at 1:07 pm #74475SusanModeratorHi, as you posted this a while back, I hope you got your issue resolved. If not, please check back, and I will escalate for you. If it is resolved, please mark “resolved”, and I will close it. Thanks!
November 20, 2013 at 11:11 pm #74661travlandersMemberThe original question which was not stated very well was how to manipulate what the posts looked like...
I wanted to add something to line of the post where the number of comments are displayed.
I thought this would be somehow connected to the query array but it is not...
In the end I used my custom query to return my results then I hooked into that comment line which is actually called $post_Info. I inserted this filter on my functions page......
add_filter( 'genesis_post_info', 'post_info_filter' ); function post_info_filter( $post_info ) { $addedString = 'Stuff I wanted to add which was a FB like tag'; return $post_info.$addedString; }
Solved
-
AuthorPosts
- The topic ‘genesis_custom_loop vs genesis_grid_loop: How to format posts?’ is closed to new replies.