Community Forums › Forums › Archived Forums › Design Tips and Tricks › Featued Page Plugin
- This topic has 2 replies, 2 voices, and was last updated 9 years, 11 months ago by alanaburton.
-
AuthorPosts
-
October 7, 2014 at 1:47 pm #127015alanaburtonMember
Does anyone know if there's a recommended plugin that would allow me to feature certain pages on another page?
There's obviously many widgets that allow you to feature a page in a sidebar but I want a certain page to automatically pull in snapshots of it's sub-pages and showcase them as something like featured pages.
I've found the following suggestion which works but just shows the child pages up as bullet points within the parent page. While this is the idea I am looking for, I would like it to show up with a featured image and potentially excerpt of content per child page showing up. Can anyone let me know how to modify the code below to do this?
function wpb_list_child_pages() {
global $post;
if ( is_page() && $post->post_parent )
$childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
else
$childpages = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
if ( $childpages ) {
$string = '- ' . $childpages . '
';
}
return $string;
}
add_shortcode('wpb_childpages', 'wpb_list_child_pages');I've also added the relevant short code to the parent page. It's going on a site that's under construction at the moment so there's nothing relevant as such to see as an example in any way.
Any tips gratefully received!
http://bergdorfandgreen.com/October 7, 2014 at 7:22 pm #127047DTHkellyMemberHave you seen:
https://wordpress.org/plugins/custom-content-shortcode/or
one of the other pluginsshortcoded with
October 8, 2014 at 6:18 am #127099alanaburtonMemberMany thanks for the input!
I've tried both and the https://wordpress.org/plugins/custom-content-shortcode/ is yielding better results so far. There's a lot of parameters that can be changed clearly to pimp it up a bit and I don't understand all of them but the basic settings have at least given me a featured image and a title.
I haven't managed to get it to auto-populate with all sub-pages of a certain parent page but what I have is a good step forward so thank you very much!
I'm not too good with shortcodes so I've had to try a few things to get what I wanted, some examples in their plugins would have been great, so In case anyone else wants to know to modify/update the shortcodes with own parameters, I have got this:
[content type="page" name="loving-tulle" field="title-link"]
[content type="page" name="loving-tulle" field="excerpt"]
[content type="page" name="loving-tulle" field="image" size="thumbnail" ]
[content type="page" name="panama-hats-summer-staple" field="title-link"]
[content type="page" name="panama-hats-summer-staple" field="excerpt"]
[content type="page" name="panama-hats-summer-staple" field="image" size="thumbnail"]This then shows a thumbnail image, title link URL plus excerpt for any pages specified so as sub-pages grow I imagine I will have to manually add another 3 lines of shortcode unless I figure out in the meantime how to auto-populate it to show all the above info for all new sub-pages in the same way.
Thanks again!
Alana 🙂
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.