-
-
Save sokratesagogo/5cf0e8c8cc0d1db03a0b128b6d87c8e9 to your computer and use it in GitHub Desktop.
Add page parent to BS-Isotope shortcode parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ob_start(); | |
extract(shortcode_atts(array( | |
'terms_parent' => '', | |
'type' => '', | |
'order' => 'date', | |
'orderby' => 'date', | |
'posts' => -1, | |
'tax' => '', | |
'terms' => '', | |
'post_parent' => '' | |
), $atts)); | |
$options = array( | |
'order' => $order, | |
'orderby' => $orderby, | |
'posts_per_page' => $posts, | |
'post_type' => 'post', | |
); | |
// Page Parent | |
$post_parent= trim($post_parent); | |
if ($post_parent!= '' ) { | |
$options['post_parent'] = $post_parent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to implement your feature but can't get it to work. Can you share the entire template and a sample shortcode?