• Hello,
    I’m trying to get an extract of the “About” page on the front page. I thought that it should be possible since the functions.php includes the folllowing code :

    function sporty_add_excerpt_support_for_pages() {
    	add_post_type_support( 'page', 'excerpt' );
    }

    But I don’t find anyware a way to include it on home page.
    Morover, I’d like the excerpt to show only the text, and not the title of the “About” page.

    If it’s not possible to do it graphicaly
    I’ve red a tutorial where they suggest to use this code in order to show the excerpt, but I don’t know where I’m supposed to paste it

    $args = array(
    'post_type' => array( 'page' ),
    'posts_per_page' => 10,
    ); 
    // The Query
    $the_query = new WP_Query( $args );
     
    // The Loop
    if ( $the_query->have_posts() ) {
        while ( $the_query->have_posts() ) {
            $the_query->the_post();
            //echo '<h3>'. get_the_title() . '</h3>';
            the_excerpt();
        }
        /* Restore original Post Data */
        wp_reset_postdata();
    } else {
        // no posts found
    }

    Thanks a lot !

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Page excerpt on front page’ is closed to new replies.