emilyT
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Feature post to display only on first page
Started by: emilyT in: Toolset Professional Support |
2 | 3 | 6 years, 5 months ago | ||
Creating a view to list taxomony terms
Started by: emilyT in: Toolset Professional Support |
2 | 8 | 6 years, 7 months ago | ||
Adding HTML markup to CPT description
Started by: emilyT in: Toolset Professional Support |
2 | 3 | 6 years, 7 months ago | ||
Order by title ignoring quote marks
Started by: emilyT in: Toolset Professional Support |
2 | 3 | 7 years, 1 month ago | ||
Previous / Next within parent/child relationship
Started by: emilyT
in: Toolset Professional Support
Problem: I would like to include pagination on my single post pages that allows a user to navigate between posts that are children of the same parent post. Solution: Legacy Relationships: Add a pagination shortcode that will output the next and previous links based on the parent and child post types: // Add Pagination Shortcode function pagination() { $next_post = wpv_child(1, 'exhibition', 'painting'); $previous_post = wpv_child(-1, 'exhibition', 'painting'); $prev_pagination= ''; $next_pagination = ''; if($previous_post ){ $prev_pagination = "<div class='navigation'><div class='previousnav'> <a href='".get_permalink($previous_post->ID)."'> << ".get_the_title($previous_post->ID)."</a></div>"; } if($next_post){ $next_pagination = "<div class='nextnav'><a href='".get_permalink($next_post->ID)."'> ".get_the_title($next_post->ID).">></a></div>"; } $pagination = "<div class='currentexb'><a href='http://www.neilpinkett.co.uk/npwp/exhibition/''>GALLERY</a> >".get_the_title()."</div>"; return $prev_pagination.$pagination.$next_pagination; } add_shortcode( 'pagination', 'pagination' ); function wpv_child($step, $parentslug, $childslug) { global $post; $parent = get_post_meta($post->ID, '_wpcf_belongs_' . $parentslug . '_id', true); $children = get_posts(array('post_type' => $childslug, 'meta_key' => '_wpcf_belongs_' . $parentslug . '_id', 'meta_value' => $parent, 'numberposts' => -1)); $i = 0; foreach ($children as $i => $child) { if ($child->ID == $post->ID) break; } $i += $step; if (isset($children[$i])) return $children[$i]; } |
3 | 11 | 7 years, 1 month ago | ||
Sort by numeric field not working following WP-Types upgrade
1
2
Started by: emilyT in: Toolset Professional Support |
3 | 17 | 7 years, 1 month ago | ||
Either adding prev/next to content template or moving related posts to theme
Started by: emilyT in: Toolset Professional Support |
2 | 13 | 7 years, 2 months ago | ||
Frontend Export to CSV
Started by: emilyT in: Toolset Professional Support |
2 | 3 | 7 years, 5 months ago |