- This topic has 23 replies, 3 voices, and was last updated 2 years ago by
Tom.
-
AuthorPosts
-
May 5, 2020 at 6:57 am #1270461
GeneratePressUser
Hello,
Yes, is it possible for you to email me, I will share with u account details so that u get better idea of it and will share there screenshot for the same things to better understand, I canโt share here in public.
May 5, 2020 at 6:59 am #1270465David
StaffCustomer SupportYou can send information and URLs via the Account Issue form here:
https://generatepress.com/contact/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 5, 2020 at 9:55 am #1270871GeneratePressUser
Hello David,
Done, all things sent via that form ๐
May 5, 2020 at 4:16 pm #1271273Tom
Lead DeveloperLead DeveloperHi there,
It’s pretty difficult to debug something like this without digging deep into the code of the shortcodes, which isn’t really something we can do.
We can help debug though. For example, is it any two shortcodes, or only a specific pair of shortcodes?
You could try doing something like this:
<?php if ( is_single( 'post-id' ) ) { echo do_shortcode( '[Custom shortcode 1]' ); echo do_shortcode( '[Custom shortcode 2]' ); } ?>
Then un-check the “Execute Shortcodes” option.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 5, 2020 at 8:04 pm #1271384GeneratePressUser
Hello Tom,
Yes, I can understand, even I don’t want to dig deep into debugging code of shortcodes nor I want you guys to do that.
I will test the code which you gave and let you know how it goes.
May 5, 2020 at 8:13 pm #1271386GeneratePressUser
Hello Tom,
Brilliant! That solved it lol.
Any idea what could have caused that?
Btw in same format:
<?php
if ( is_single( ‘post-id’ ) ) {
echo do_shortcode( ‘[Custom shortcode 1]’ );
echo do_shortcode( ‘[Custom shortcode 2]’ );
}
?>Can you pls give me code to write custom html code in it? like right now it’s echo do_shortcode so what to write to execute something other than shortcode?
May 6, 2020 at 10:11 am #1272453Tom
Lead DeveloperLead DeveloperWhen you execute shortcodes in the hook, it wraps the entire content in a
do_shortcode()
function. Perhaps it didn’t like executing multiple shortcodes at once.You can add HTML like this:
<?php if ( is_single( 'post-id' ) ) { echo '<div class="first-shortcode">'; echo do_shortcode( '[Custom shortcode 1]' ); echo '</div>'; echo '<div class="second-shortcode">'; echo do_shortcode( '[Custom shortcode 2]' ); echo '</div>'; } ?>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 6, 2020 at 10:48 am #1272511GeneratePressUser
Got it, thanks a lot ๐
May 6, 2020 at 3:30 pm #1272855Tom
Lead DeveloperLead DeveloperYou’re welcome ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.