- This topic has 7 replies, 3 voices, and was last updated 4 years, 11 months ago by
Leo.
-
AuthorPosts
-
June 11, 2021 at 2:58 am #1818352
Samuel
Hi Team,
I have created a shortcode, which is not working. But other custom shortcodes working perfectly.
I just showing you my shoercode codes:
function dl_minti_button_shortcode($atts, $content = '') { extract( shortcode_atts( array( 'link' => '#', 'target' => '_blank', 'lightbox' => '', 'color' => '', 'icon' => '' ), $atts ) ); ob_start(); ?> <div class="minti_butto_wrap"> <a href="<?php echo $link; ?>" target="<?php echo $target; ?>"><?php echo $content; ?></a> </div> <?php return ob_get_clean(); } add_shortcode( 'minti_button', 'dl_minti_button_shortcode' );I have applied this shortcode in this page https://justcreative.com/shortcode-test-page/
But showing me plain shortcode text. See screenshot http://i.prntscr.com/8Dm_8e8bRRixNvkW2IqMgQ.png
So, please me how can I solve this problem.
June 11, 2021 at 5:07 am #1818477David
StaffCustomer SupportHi there,
i just tested the shortcode in the Block editor using the Shortcode Block and it returns the correct HTML.
How is the shortcode being added to the site ?June 11, 2021 at 6:42 am #1818569Samuel
I added shortcode codes inside functions.php file.
And I added this shortcode
[minti_button link=”https://www.designcuts.com/product/female-crop-top-t-shirt-mockup/?ref=jacobcass&tap_s=1827493-03df7e” target=”_blank”]Download Now[/minti_button]
But showing me shortcode text at forntend.
June 11, 2021 at 7:52 am #1818813David
StaffCustomer SupportIn the post editor – how is it added? Are you using the Block Editor ? If so it should go in the Short Code block.
June 11, 2021 at 7:55 am #1818820Samuel
No, I used text editor.
June 11, 2021 at 9:51 am #1818977Leo
StaffCustomer SupportCan’t see how this would be theme issue as it’s a custom function/shortcode.
Does it work in a shortcode block?
And does it work in a Twenty series WP theme?
June 11, 2021 at 11:30 pm #1819395Samuel
Other shortcodes working fine. Just problem with this shortcode [minti_button]
June 12, 2021 at 6:58 am #1819637Leo
StaffCustomer SupportI would say that the shortcode itself is the issue – the theme itself has no way of stopping a shortcode from working.
Have you tested with a Twenty series WP theme?
-
AuthorPosts
- You must be logged in to reply to this topic.