Support » Plugin: Insert Pages » Can we add up excerpt and featured image to it

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Paul Ryan

    (@figureone)

    Sure, just create a custom template in your theme and use that:

    <?php
    /**
     * Template Name: Excerpt with Featured Image
     *
     * This template shows just the page excerpt and the featured image.
     */
    
    while ( have_posts() ) : the_post();
    	the_excerpt();
    	the_post_thumbnail();
    endwhile;
    WebGuruSana

    (@webgurusana)

    I created a template and copy pasted the code. I see a blank page after inserting the shortcode and choosing the right template from the dropdown.

    Plugin Author Paul Ryan

    (@figureone)

    Look at your error logs to see what the error was.
    http://codex.wordpress.org/Common_WordPress_Errors#The_White_Screen_of_Death

    WebGuruSana

    (@webgurusana)

    Do I simply need to create the template and add the above code?

    Don’t we need to insert the commands to showcase header and footer?

    Plugin Author Paul Ryan

    (@figureone)

    For a proper theme template, yeah you should have header and footer calls. I think the get_header() and get_footer() calls are ignored when the template is used in an inserted page, because they’ve already been called in the template for the parent page.

    So it should be fine to put the header and footer calls in the template you use for inserted pages. As long as that template is in your active theme directory, it should be visible to Insert Pages as a custom template.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can we add up excerpt and featured image to it’ is closed to new replies.