• rmsgreig

    (@rmsgreig)


    I have created a shortcode that lists fixtures in a sporting competition from a json api, for each of the fixtures in this list I would like to use buttons to call other shortcodes that will provide different updates to the fixture such as goals scored etc. What would be the best way to do this?
    What I have so far in my test code is

     $return.= '<input value="Show Cards" type="submit" name="cards"/>';
    
     }
    
      $return .= '</ul>';
    
            return $return;
    
       if(isset($_POST['cards']))  
         
     {
         function fixture_cards()
         {
       echo do_shortcode('[card_updates fixture="' . $fixtureID . '" event="card"]');
         }
     }

    am I going about this the correct way?
    Thanks in advance for any help

    • This topic was modified 7 years ago by rmsgreig.
  • The topic ‘How to call shortcodes in buttons in shortcode?’ is closed to new replies.