My first WordPress shortcode just returning []

Question

I have been trying to get a new shortcode working and have simplified my code to almost nothing but still keep getting output of just [shortcode_name]. I must be missing something pretty fundamental but cannot work it out.

<?php
/** Bridge Card Table Display Short Code
  * Plugin Name: Bridge Card Table Shortcodes
  * Description: Short codes for rendering bridge hands and tables.
  * Version:     0.0.04
  * License:     GBP v2 or later
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

  
function cards_table($attributes){

  $args=shortcode_atts(array(
    // default values
    'title' => 'A',
    'dlr' => 'B',
    'vul' => 'C',
    'north' => 'D',
    'south' => 'E',
    'east' => 'F',
    'west' => 'G'
  ), $attributes);


  $output = "Test output: title=" . $args['title'];

  return $output;

}

// register shortcode

add_shortcode('Card Table','cards_table');

?>

I have tried stripping out all the argument code too. I have activated it (checked and double checked). Commercial and built-in short codes work perfectly.

Help please!

Thanks,

Mike

0
Mike 1 month 2022-08-22T22:11:33-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse