title: shortcode for a custom post type
body: <p>I have these code to create my button short code:</p>
  <pre><code>add_shortcode( 'modal', 'modal_shortcodes' );
  function modal_shortcodes( $atts ) {
  
      $attr = shortcode_atts(array(
          'btn_name' =&gt; 'default button name',
      ), $atts);
  
      $content =  '&lt;button&gt;'. esc_attr($attr['btn_name']) . '&lt;/button&gt;'; 
      return $content;
  }
  </code></pre>
  <p>and I have these codes to create custom post type:</p>
  <pre><code>function custom_post_type() {
      register_post_type('multi-step-form', array(
      'supports' =&gt; array('title'),
      'public' =&gt; false,
      'show_ui' =&gt; true,
      'labels' =&gt; array(
        'name' =&gt; 'Multi-Step Forms',
        'add_new_item' =&gt; 'Add New Multi-Step Form',
        'edit_item' =&gt; 'Edit Multi-Step Form',
        'all_items' =&gt; 'All Multi-Step Forms',
        'singular_name' =&gt; 'Multi-Step Form'
      ),
      'menu_icon' =&gt; 'dashicons-universal-access-alt',
  
    ));               
  }   
  </code></pre>
  <p>I want to know how can I do the following:</p>
  <ol>
  <li>The custom post type I created 'multi-step-form' &lt;-- every time I add a  new post, it will generate a short code (for each post).</li>
  </ol>
  <p>Example: I will add a post title 'button1&quot;</p>
  <p>then it will dynamically create a short code like <code>&lt;button class&quot;button1&quot;&gt;&lt;/button&gt;</code></p>
  <ol start="2">
  <li>then if I create another post, it will create again another short code (depends on the title) to create a button like <code>&lt;button class=&quot;button2&quot;&gt;&lt;/button&gt;</code></li>
  </ol>
  <p>Any ideas what should I research for my to achieve those?</p>
  <p>Please see this screenshot for example: <a href="https://i.stack.imgur.com/QMadI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QMadI.png" alt="enter image description here" /></a></p>