Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dimavrn1

    (@dimavrn1)

    How function are displayed list of all posts in site i think it get_posts but it don t work

    Thread Starter dimavrn1

    (@dimavrn1)

    I just did not seem to put it right ….
    In your framework, there are shortcode display widget aria, and it is possible to choose a dynamic list of sidebars

    <?php if (!defined('FW')) die('Forbidden');
    
    class FW_Shortcode_Widget_Area extends FW_Shortcode
    {
    	public static function get_sidebars()
    	{
    		global $wp_registered_sidebars;
    
    		$result = array();
    		foreach ( $wp_registered_sidebars as $sidebar ) {
    			$result[ $sidebar['id'] ] = $sidebar['name'];
    		}
    
    		return $result;
    	}
    }

    instructions no how to display dynamic lists in the selection ‘choices’

    <?php if (!defined('FW')) die('Forbidden');
    
    $options = array(
    	'sidebar' => array(
    		'label'   => __( 'Sidebar', 'fw' ),
    		'desc'    => '',
    		'type'    => 'select',
    		'choices' => FW_Shortcode_Widget_Area::get_sidebars()
    	)
    );

    I want to display a list of all Posts/Pages that are on the site in a dynamic list of what code I need to do in a class file?

Viewing 2 replies - 1 through 2 (of 2 total)