Design Gallery API
mvp_design_gallery($designs, $options);
$designs must either be an instance of $wp_query for design post type (typically in archive-designs.php) or args that can be sent to create a new instance of WP_Query
Two special keys exist that get converted to tax_query: product and specialty used like this:
array('product' => 'new-mover')
array('specialty' => array('general', 'pediatric'))
$options are configuration for which elements to include. These are the available options:
title
link
link_text
Examples
mvp_design_gallery(
array('posts_per_page' => 3),
array( 'title' => 'Top Performing Designs', 'link_text' => 'View Full Design Gallery', 'link' => '/designs/' )
);
mvp_design_gallery(
array('posts_per_page' => 3, 'product' => 'new-mover'),
array( 'title' => 'Top Performing New Mover Mail Designs', 'link_text' => 'More New Mover Designs', 'link' => '/designs/product/new-mover/' )
);
mvp_design_gallery(
array('posts_per_page' => 3, 'product' => 'new-patient'),
array( 'title' => 'Top Performing New Patient Mail Designs', 'link_text' => 'More New Patient Designs', 'link' => '/designs/product/new-patient/' )
);
mvp_design_gallery(
array('posts_per_page' => 3, 'specialty' => 'pediatric'),
array( 'title' => 'Top Pediatric Designs', 'link_text' => 'Custom Link Text', 'link' => '/designs/specialty/pediatric/' )
);
mvp_design_gallery(
array('posts_per_page' => 3, 'specialty' => 'orthodontic'),
array( 'title' => 'Top Orthodontic Designs', 'link_text' => 'View Orthodontic Gallery', 'link' => '/designs/specialty/orthodontic/' )
);
mvp_design_gallery(
array('posts_per_page' => 3),
array( 'title' => 'Custom Mini Gallery Title', 'link_text' => 'Custom Link Text', 'link' => '/designs/' )
);
Custom Mini Gallery Title