Forum Replies Created
-
AuthorPosts
-
billericksonMember
Yes, you are correct. When you use [display-posts include_content="true"], it strips out any instances of the [display-posts] shortcode in that resulting output. This is by design.
Without this feature you could break your website with an infinite loop. If you include_content and one of those posts also has a shortcode that includes_content linking to the current page, the infinite loop will break your site.
This feature will never be removed from the Display Posts Shortcode. If you want to run the risk of breaking your website, you can manually edit the plugin and remove the add_filter() and remove_filter() lines here: https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L423-L428
I also recommend you change the plugin version number to something high, like 99, right here ( https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L6 ) so that when the plugin is updated your manual edits are not lost.
billericksonMemberThe function you're making changes to is be_grid_content(), which displays the content of your grid posts.
The reason you are seeing the first post's title and not the rest is you've told Genesis to remove the post title but you did it from the content area, so the first post's title has already been output.
Remove the code you added to be_grid_content() : remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
Then add this: https://gist.github.com/billerickson/beb827a15c5407e62de2
billericksonMemberInstead of creating a new page template, try using my Genesis Title Toggle plugin.
billericksonMemberWhere is the thumbnail coming from on the single post? That's not a Genesis feature. My guess is that the Agency theme is adding that. Find the function that's outputting the thumbnail on the single post and change the size from 'thumbnail' to 'full'
billericksonMemberI'll be honest, I don't see how the code you posted is actually working.
1. be_no_thumbnail(), in the way you're using it, should be echo'ing the output, not returning it.
2. be_no_thumbnail() has an is_category() conditional, which means it can't be running on the single posts.I think you're over complicating things. What happens if you remove all this code? What is the default display of the single post? Then what are the features you're looking to add?
If the only feature you want to add is a fallback for the archive page, add the following to your theme's functions.php file: https://gist.github.com/billerickson/6381350
I duplicated the genesis_do_post_image() function as be_post_image_with_fallback(). I then added a bit to it (right before the !empty( $img) ) that adds the fallback if there's no image. I then removed the genesis_do_post_image() function from its hook and replaced it with our new one. I also defined the fallback image function.
This could also be done with less code by filtering genesis_get_image args and settings the 'fallback' to your fallback image. But that would be a bit more complicated and outside the scope of the tutorial you linked to previously
billericksonMemberWhy not use the BE Subpages Widget plugin? Seems like it already does everything you're trying to do.
billericksonMemberAre you trying to add the Genesis Simple Menus metabox to the Edit Videos screen? Add this to your theme's functions.php file:
add_post_type_support( 'video', 'genesis-simple-menus' );
billericksonMemberTry using the Genesis Title Toggle plugin. Once installed, you can go to Genesis > Theme Settings to hide all page titles by default. When editing an individual page you can override this.
billericksonMemberIt will be coming out early next week: https://twitter.com/bgardner/status/363053913559146497
billericksonMemberTry using the Genesis Title Toggle plugin. Once installed, you can go to Genesis > Theme Settings to hide all page titles by default. When editing an individual page you can override this.
March 26, 2013 at 11:28 am in reply to: Custom Sidebars for CPT Showing Primary Widgets as Well #31347billericksonMemberTwo issues:
You need to remove the function that Genesis Simple Sidebars adds to create a sidebar. That's what's causing the extra one
You should make your function hook in later so that it will catch Genesis Simple SidebarsHere's how I would do it: https://gist.github.com/billerickson/5247346
You could also simplify this by replacing the last add_action() with the dynamic_sidebar( 'sermon-sidebar' ) since you're already on the genesis_sidebar hook.
February 14, 2013 at 5:56 pm in reply to: Grid loop (Bill Erickson version) – content limit for features #20425billericksonMemberDid my response to your comment on my blog not work? Here's what I said:
Try this instead: https://gist.github.com/billerickson/4947529
The filter in the previous link doesn’t exist in the advanced example above, only the plugin.
You can use the plugin with custom post types by using the ‘genesis_grid_loop_sections’ filter (http://www.billerickson.net/code/limit-genesis-grid-to-specific-category/ ). I prefer to use the plugin rather than the advanced example above to keep the theme simpler.
billericksonMember(my responses keep getting lost. I responded to this a while ago)
The issue is that the pagination functions use the main query, not your custom one. So a hacky workaround is to overwrite the main query with your new one (assign your query to $wp_query instead of $loop).
At the end, include wp_reset_query() which resets $wp_query and $post. wp_reset_postdata() only does the $post.
Example: http://www.billerickson.net/code/pagination-in-a-custom-query/
billericksonMemberGlad I can help!
billericksonMemberQuery arguments in the grid loop are now ignored. This is because most uses of the grid loop were for displaying the main query (ex: blog posts on your blog page, category page...), and providing query arguments like 'posts_per_page' lead to 404 errors. Unfortunately this also means you can't use it for custom loops, like you were doing.
Take a look at the staff_do_grid_loop() function here: https://gist.github.com/4548000 (I wrote it directly in the Gist so can't guarantee it's perfect).
First you specify your query arguments, then create a new loop like this: $loop = new WP_Query ($args );
Then you loop through this: if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post();
Then you specify the markup for each post. I'm wrapping them in a div with either a class of "one-half first" or "one-half" depending on the post count. Inside this div, I have the title hyperlinked and the excerpt.
Finally, once you're done with your loop run wp_reset_postdata(); . This reverts the $post object back to the original query's.For more information:
Custom WordPress Queries (for custom queries)
Customizing the WordPress Query (for the main page query)
A better, easier grid loop (this is for the main query, but the example I provided in this post takes the idea and applies it to a custom query)billericksonMember(hopefully my long, previous reply will show up sometime. Here it is: https://gist.github.com/4548117 )
@varickdesign, there was no change to WordPress core that made this an issue. The problem is that the grid loop was poorly constructed to begin with. When modifying the main query (which this was originally designed for), you need to separate the actual query from the formatting. Read my blog posts at the bottom of the previous post for more information.billericksonMemberQuery arguments in the grid loop are now ignored. This is because most uses of the grid loop were for displaying the main query (ex: blog posts on your blog page, category page...), and providing query arguments like 'posts_per_page' lead to 404 errors. Unfortunately this also means you can't use it for custom loops, like you were doing.
Take a look at the staff_do_grid_loop() function here: https://gist.github.com/4548000 (I wrote it directly in the Gist so can't guarantee it's perfect).
First you specify your query arguments, then create a new loop like this: $loop = new WP_Query ($args );
Then you loop through this: if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post();
Then you specify the markup for each post. I'm wrapping them in a div with either a class of "one-half first" or "one-half" depending on the post count. Inside this div, I have the title hyperlinked and the excerpt.
Finally, once you're done with your loop run wp_reset_postdata(); . This reverts the $post object back to the original query's.For more information:
Custom WordPress Queries (for custom queries)
Customizing the WordPress Query (for the main page query)
A better, easier grid loop (this is for the main query, but the example I provided in this post takes the idea and applies it to a custom query)billericksonMemberHave you tried using this plugin?
http://wordpress.org/extend/plugins/genesis-grid-loop/
I haven't tested it in Landscape but it should work on all Genesis child themes (as long as the main loop hasn't been modified).
billericksonMemberHere's how I'd do it:
1. Move the .page-title box outside of #inner, to just below the header. I don't have your theme code so I'm not sure exactly what it looks like (and I'm not doing all the work for you 🙂 ), but it would be something like this:
remove_action( 'genesis_before_content_sidebar_wrap', 'page_title_area' );
add_action( 'genesis_after_header', 'page_title_area' );2. Since you've moved it outside of #inner .wrap, you'll need to modify the function so it has its own wrap. Hop into the function responsible for the page title area, and add <div class="wrap"> at the top and </div> at the bottom (you could also add this inside the .page-title div, but then you might need to modify some styles since right now it's expecting the .page-title to be inside a wrap)
3. Now the content is the first thing inside of #inner, so apply your full width styling to #inner.
December 12, 2012 at 2:23 pm in reply to: How do I Remove Blog, side bar, & footer from home page #4769billericksonMemberChange it to this: https://gist.github.com/e96d8669be4502217e47
(I added the two lines to the top of the file, but below the <?php )
-
AuthorPosts