- This topic has 7 replies, 3 voices, and was last updated 2 years, 4 months ago by Tom.
-
AuthorPosts
-
November 20, 2021 at 11:10 am #2012449drew
I’m using the recommended snippet to insert a page excerpt into a header element and it works fine except when I need to use a column shortcode via Tom’s lightweight grid column plugin. It seems that nested shortcodes aren’t working so is there a version of the snippet at https://docs.generatepress.com/article/page-hero-examples/#example-4 that will allow it to work as a nested shortcode?
November 20, 2021 at 12:14 pm #2012497LeoStaffCustomer SupportHi there,
That method is old.
I would recommend using a block element page hero;
https://docs.generatepress.com/article/block-element-page-hero/Then you can use GP’s dynamic block:
https://docs.generatepress.com/article/dynamic-blocks/#post-excerptThen you can avoid LGC and use the grid block from GB as well:
https://docs.generateblocks.com/article/grid-overview/We don’t recommend using LGC anymore – it’s a very ourdated method.
November 20, 2021 at 1:04 pm #2012534drewThanks Leo, I’m not using blocks, they aren’t WCAG compliant and without any sort of converter for the hundreds of instances of header elements in place now, being forced into them at this point isn’t an option. Consequently, how do I get the nested shortcodes working here?
I’ve mentioned the desperate need for the migration/converter tool to Tom on a few occasions now but never hear back about any progress or a road map. Without it, GP is asking devs to migrate all of their client designs manually. I took the time to calculate how many work hours it would require and I’m looking at more than $6,000 in labor alone with all the client sites we manage. then we have to add all the variables of building out the changes in a dev environment and adding even more time to include client sales records etc. that rolled in during the migration period. It’s a serious clusterfoxtrot without a tool to handle these migrations so devs aren’t expected to ostensibly rebuild each and every one of their sites from scratch.
So please, I would be grateful if we could get LGC working with nested shortcodes.
November 20, 2021 at 8:58 pm #2012735TomLead DeveloperLead DeveloperHey Drew,
If it were me, I would just use custom HTML with some simple flexbox CSS to create columns instead of using shortcodes.
However, if you want to use LGC, you’ll have to edit the main plugin file so it accepts shortcodes.
You’d replace this line: https://github.com/tomusborne/lightweight-grid-columns/blob/master/lightweight-grid-columns.php#L151
With this:
return force_balance_tags( do_shortcode( $content ) );
That should allow for shortcode nesting.
Let us know π
November 21, 2021 at 9:15 am #2013453drewHi Tom, you are absolutely correct, we could handle that with either some HTML or adding a CSS class. I was hoping we could keep things more efficient by using the tools we have in place already and clients are comfortable using when they need to make content changes.
Thanks for the code modification.
Have you folks had the bandwidth to take a closer look at the section migration function?
November 21, 2021 at 5:42 pm #2013866TomLead DeveloperLead DeveloperHaven’t had the opportunity to look at it yet, unfortunately. We’ve had some pretty major things in development (GP 3.1, upcoming GB version).
It’s still on our roadmap π
November 21, 2021 at 8:03 pm #2013934drewMany thanks and I sincerely appreciate the update.
November 22, 2021 at 8:52 pm #2016712TomLead DeveloperLead DeveloperNo problem! π
-
AuthorPosts
- You must be logged in to reply to this topic.