Viewing 1 reply thread
  • Author
    Posts
    • #7655
      hozefasmile
      Member

      Hi All,

      Please help me with shortcode working. I have created two files in themes shortcodes folder. social.php and social-form.php
      social-form has following code:-

      <?php
      /*
      Name: My Social
      Description: Add url of social media pages
      Shortcode: my_social
      Icon: dashicons-share
      Inline: true
      preview: false 
      editor: false 
      */
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'my_facebok_url'
          ,'label' => 'Facebook Link'
          ,'attributes' => array(
            	'class' => 'regular-text' // WordPress css class 
          	)
          ,'required' => true
        ));
      piklist('field',array(
      	'type' => 'text'
      	,'field' => 'my_twitter_url'
      	,'label' => 'Twitter Link'
      	,'attributes' = array(
      		'class' => 'regular-text'
      	)
      ));

      and social.php has following :-

      <?php
      /*
      Shortcode: my_social
      */
      ?>
      <ul class="social">
      	<li><a href="<?php echo esc_html($my_facebok_url); ?>" target="_blank"><i class="fa fa-facebook"></i> Facebook</a></li>
      	<li><a href="<?php echo esc_html($my_twitter_url); ?>" target="_blank"><i class="fa fa-twitter"></i> Twitter</a></li>
      </ul>

      Now when I go to add a new page and click on shortcode button, its open the popup, where I can see my “My Social” icon box, then when I click it, it shows just a blank space, no form fields are showing in next screen to fill up to generate shortcode. Can anybody have idea why its not working?
      I am using piklist 0.9.9.9 and wordpress 4.7

    • #7684
      Steve
      Keymaster

      Looks like their is a shortcode issue with Piklist and WordPress 4.7 right now

Viewing 1 reply thread
  • You must be logged in to reply to this topic.