Okay
  Public Ticket #3366834
Portfolio Excerpt PHP
Closed

Comments

  •  17
    TheSnapAgency started the conversation

    Hi,

    We're using search and filter pro to create a custom post feed. We're trying to pull through the Portfolio Excerpt using php but we can't seem to get it to work. We have tried this but it didn't work:

    <?php
    $args = array(
        'post_type' => 'portfolio',
        'posts_per_page' => 1,
    );

    $portfolio_query = new WP_Query( $args );

    if ( $portfolio_query->have_posts() ) {
        while ( $portfolio_query->have_posts() ) {
            $portfolio_query->the_post();
            echo get_the_excerpt();
        }
    }

    wp_reset_postdata();
    ?>


    Can you help

  •  1,877
    Judith replied

    Hi there,

    Thanks for choosing Salient.

    I am afraid code customization is beyond our scope of support. I would request you hire a private developer to assist better.

    Thanks.

  •  17
    TheSnapAgency replied

    Hi Judith

    I can see Salient generate a shortcode to get the Portfolio excerpt. Is there no way to call it like this:

    <?php echo $project_excerpt; ?>
    

    I'm just trying to find the reference that you are already currently using throughout the salient theme.


    Thanks


  •  8,839


    ThemeNectar Support Team