Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End shortcode isn’t working

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41911
    cybershot
    Participant

    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

    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.

    #122264
    xfactor
    Member

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.