[Support request] One Shortcode Doesn’t work

Home Forums Support [Support request] One Shortcode Doesn’t work

Home Forums Support One Shortcode Doesn’t work

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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.

    #1818477
    David
    Staff
    Customer Support

    Hi 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 ?

    #1818569
    Samuel

    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&#8221; target=”_blank”]Download Now[/minti_button]

    But showing me shortcode text at forntend.

    #1818813
    David
    Staff
    Customer Support

    In the post editor – how is it added? Are you using the Block Editor ? If so it should go in the Short Code block.

    #1818820
    Samuel

    No, I used text editor.

    #1818977
    Leo
    Staff
    Customer Support

    Can’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?

    #1819395
    Samuel

    Other shortcodes working fine. Just problem with this shortcode [minti_button]

    #1819637
    Leo
    Staff
    Customer Support

    I 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?

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.