Forums

Give help. Get help.

  • # January 10, 2013 at 10:05 pm

    In WordPress. Got this shortcode in my functions.php

    function amaranthe_buy_tickets( $atts, $content = null ) {
    extract(shortcode_atts(array(
    ‘link’ => ‘#’,
    ‘target’ => ”,
    ‘variation’ => ”,
    ‘size’ => ”,
    ‘align’ => ”,
    ), $atts));

    $style = ($variation) ? ‘ ‘.$variation. ‘_gradient’ : ”;
    $align = ($align) ? ‘ align’.$align : ”;
    $size = ($size == ‘large’) ? ‘ large_button’ : ”;
    $target = ($target == ‘blank’) ? ‘ target=”_blank”‘ : ”;

    $out = ‘‘ .$content. ‘‘;

    return $out;
    }
    add_shortcode(‘buy-tickets’, ‘amaranthe_buy_tickets’);

    in my template file where I want the shortcode to display, I have this

    < ?php echo do_shortcode("[buy-tickets]"); ?>

    and in the post, I have this

    [buy-tickets]Tickets[/buy-tickets]

    in the output, all I get is this

    for some reason, the content is missing.

    # January 25, 2013 at 7:42 am

    @cybershot did you checked your apache config file ? there is an option to enble shortcode

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag