emilyT
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Feature post to display only on first page
Commencé par : emilyT in: Toolset Professional Support |
2 | 3 | Il y a 6 années et 6 mois | ||
Creating a view to list taxomony terms
Commencé par : emilyT in: Toolset Professional Support |
2 | 8 | Il y a 6 années et 7 mois | ||
Adding HTML markup to CPT description
Commencé par : emilyT in: Toolset Professional Support |
2 | 3 | Il y a 6 années et 7 mois | ||
Order by title ignoring quote marks
Commencé par : emilyT in: Toolset Professional Support |
2 | 3 | Il y a 7 années et 1 mois | ||
Previous / Next within parent/child relationship
Commencé par : 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 | Il y a 7 années et 1 mois | ||
Sort by numeric field not working following WP-Types upgrade
1
2
Commencé par : emilyT in: Toolset Professional Support |
3 | 17 | Il y a 7 années et 1 mois | ||
Either adding prev/next to content template or moving related posts to theme
Commencé par : emilyT in: Toolset Professional Support |
2 | 13 | Il y a 7 années et 2 mois | ||
Frontend Export to CSV
Commencé par : emilyT in: Toolset Professional Support |
2 | 3 | Il y a 7 années et 5 mois |