adwrt
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
Forum: Plugins
In reply to: [Custom Content Shortcode] description fieldMy pleasure. Thanks so much for a great plugin!
Forum: Plugins
In reply to: [Custom Content Shortcode] Passing the current page's slugThanks!
Forum: Plugins
In reply to: [Custom Content Shortcode] description fieldI figured out some modifications to foreach.php that would get me what I was looking fork. I hope you’ll incorporate it into your next version – or find an even better way to accomplish this!
To use the parent and current arguments together, at the end of the if $current==”true” block, I added a modified version of what you had in the else block, which already tested for the $parent argument:
if (!empty($parent)) { /* Get parent term ID from slug */ if ( is_numeric($parent) ) { $parent_term_id = $parent; } else { $term = get_term_by( 'slug', $parent, $each ); if (!empty($term)) $parent_term_id = $term->term_id; else $parent_term_id = null; } if (!empty($parent_term_id)) { /* Filter out terms that do not have the specified parent */ foreach($taxonomies as $key => $term) { if ($term->parent != $parent_term_id) { unset($taxonomies[$key]); } } } }And, I added:
self::$state['each']['description']=$term_object->description;and
elseif (isset( $atts['description'] )) $out = self::$state['each']['description'];towards the end to be able to use [each description] within the loop.
Forum: Plugins
In reply to: [Custom Content Shortcode] description fieldAlso, is it actually possible to combine the “parent” and “current” parameters in a [for each]?
Forum: Plugins
In reply to: [Custom Content Shortcode] [pass] within [repeater]Wow, thank you! I really appreciate you adding that functionality so quickly! It works perfectly.
Viewing 5 replies - 1 through 5 (of 5 total)