• am using a spinner and it has shortcode
    here is the plugin to spinner php file only.

    <?php
    /*
    Plugin Name: Text Spinner
    Plugin URI: http://wpgurus.net/
    Description: Allows you to use spintax in your posts, pages and theme files.
    Version: 0.1
    Author: Hassan Akhtar
    Author URI: http://wpgurus.net/
    License: GPL2
    */
    
    /**********************************************
    *
    * Spintax functions
    *
    ***********************************************/
    
    function wpts_spin($text)
    {
        return preg_replace_callback(
            '/\{(((?>[^\{\}]+)|(?R))*)\}/x',
            'wpts_replace',
            $text
        );
    }
    
    function wpts_replace($text)
    {
        $text = wpts_spin($text[1]);
        $parts = explode('|', $text);
        return $parts[array_rand($parts)];
    }
    
    /**********************************************
    *
    * Shorcode setup
    *
    ***********************************************/
    
    function wpts_render_shortcode( $atts, $content = null ) {
    	return wpts_spin($content);
    }
    add_shortcode( 'wpts_spin', 'wpts_render_shortcode' );

    this is the shortcode i use on content page that works
    [wpts_spin]{Great|Awesome|Somewhat Adequate}[/wpts_spin]

    now when i paste this shortcode in yoast description box or keyboard box it dont work can you help me please tell me how or what edits to make so it works cheers.

  • The topic ‘Yoast SEO how do i add shortcodes in description & keyword box’ is closed to new replies.