Support » Plugin: WP Simple Galleries » Add shortcode attributes

  • Resolved Everlast00


    Hi there! I love your plugin, finally a good one.

    I have one question though. I would like to extend the shortcode somehow with the ability for the user to select the view, like grid view or list view or slideshow.

    So I’d like to have: [wpsgallery style=”slideshow”].

    How and what do I change to make this work?

    To be honest, I only have this atm :p :

    public function shortcode($atts) {
            extract( shortcode_atts( array(
    		'id' => false,
    		'style' => 'Slideshow' // default,
    	), $atts ) );
            return $this->gallery($id);

    I think I need to change something near line 213:

    return '<li><a href="' . $url . '" title="' . $title . '" rel="wpsimplegallery_group_' . $post_id . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a></li>';

    Any ideas?

Viewing 1 replies (of 1 total)
  • Plugin Author Matthew McConnell



    The easist way to change the galleries style is change/add css to the themes style.css

    Most WP themes set the body class to the post type and post-id.
    <body class="page page-12">

    This allows you to specify styles for certain posttypes/posts

Viewing 1 replies (of 1 total)
  • The topic ‘Add shortcode attributes’ is closed to new replies.