Documentation | WP Masonry Layout

Documentation

1. Quick Installation Video

2. Installation

For WP Masonry Lite Version
  1. Download the plugin zip file from here
  2. Upload the plugin files from Plugin > Add New > Upload from Wordpress Admin Panel
  3. Activate It
  4. You can also search Wp Masony Layout from Plugin > Add New > Search and install it directly from Wordpress Repository.
For WP Masonry Pro Version
  1. Download the plugin zip file from here
  2. Upload the plugin files from Plugin > Add New > Upload from Wordpress Admin Panel
  3. Activate It
  4. Please make sure to deactivate and delete the lite version before using Pro Version.
Reference : If you are new to wordpress plugin installation, please refer to this detailed documentation.  

3. Plugin Admin Navigation

  • You will find the plugin admin menu WP Masonry under settings of Wordpress Admin Menu.
  • Use Shortcode menu to goto shortcode generation page.
  • Use Layout Themes menu to get the list of available themes. From there you can check demo, edit theme settings and move those files to your Wordpress Theme.
  • Use Documentation menu to goto the plugin documentation page.
WP Masonry Layout Plugin Navigation

4. Create Shortcode

  1. Goto WP Masonry > Shortcodes
  2. Under Create Shortcode Section, select the options as per your preferences.
  3. Click Save.
  4. Your shortcode will be added to Shortcodes section.
  5. Copy the shortcode and place it in your post / page editor or in theme template files.
Reference : You can keep these shortcode in theme template files like this <?php echo do_shortcode('SHORTCODE HERE');  ?> Create Masonry Brick Shortcode

5. Generic Shortcode For Category, Archive, Search templates

Generic shortcode can be used in Category, Archive, Search, Tags, Author and many more templates. It can be used in even custom taxonomy templates. For example, if you keep this shortcode in category.php template. All your category listing will be displayed in masonry layout.

6. Edit / Delete Shortcode

  1. Select Shortodes under WP Masonry
  2. Click on Edit to edit the shortcode or Delete to delete.
  3. Change settings.
  4. Click on Save.
Note : You don't need to copy/paste the shortcode after the settings has been changed. The shortcode remains same. Masonry Shortcode Edit

7. Masonry Layout Theme List

  • Goto Layout Themes under WP Masonry
  • Click on Demo for the theme working demo.
  • Click on Edit Settings to change the settings of Masonry Theme. You can add/remove section, change color, font size and more.
  • Click on Copy To Wordpress Theme to copy masonry theme to your active Wordpress theme if you need to customize it. It makes safe for customization and you changes remains same even after the plugin is update.
masonry_layout

8. Edit Masonry Theme

  1. Goto Layout Themes under WP Masonry
  2. Click on Edit Settings from theme list.
  3. Change the settings as per required.
  4. Click on Save.
  5. Click on Reset to Defaults to get the default theme settings.
Pinterest like Masonry Layout Theme Settings

9. Custom Query

From version 1.6, we have Custom Query field. If you ever need extra filters like tags, author or custom taxonomies, you can keep them in Custom query box. custom_query Custom query parameters works as wordpress Wp Query paramters. For details about accepted parameters, you can visit Wordpress Codex page here.

Few Examples
List Post By News Tags : tag=news
List Post By Author : author_name=admin

Note : If you need to write more complex queries, you can use our inbuilt filters. Please check Filters section for more details

10. Filters and Hooks

We currently have only 1 filter.

wmlp_query
Use this filter to write custom query for your shortcode. You can also write custom query based on shortcode Id. You need to write these code in functions.php of your wordpress theme.

For example.

add_filter('wmlp_query', 'my_custom_query_wmlp',10,2);
function my_custom_query_wmlp($args, $shortcodeID){
  $args['posts_per_page'] = 2;
  return $args;
}


If you want to write custom query for specific shortcode, you can use like this.

add_filter('wmlp_query', 'my_custom_query_wmlp',10,2);
function my_custom_query_wmlp($args, $shortcodeID){
  if ($shortcodeID == 2){
    $args['posts_per_page'] = 2;
    return $args;
  }
}

11. Copy Masonry Theme to WordPress Theme

  1. Goto Layout Themes Under WP Masonry
  2. Click on Copy To Wordpress Theme.
  3. Once the theme has been copied, confirmation message is displayed with the new location of the copied theme. Now you can customhouse theme as per needed and will be safe from future update as well.
Copy Masonry Theme to Wordpress Theme

12. WooCommerce Setup (Video)

13. Account Management, License Reset, Downloads (Video)