Comments 17TheSnapAgency started the conversationMay 10, 2023 at 7:19amHi,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,877Judith repliedMay 10, 2023 at 8:41amHi 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. 17TheSnapAgency repliedMay 10, 2023 at 8:49amHi JudithI 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,839Tahir repliedMay 10, 2023 at 12:09pmMerging this here https://themenectar.ticksy.com/ticket/3366875#comment-17845945 ThemeNectar Support Team Sign in to reply ...
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
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.
Hi Judith
I can see Salient generate a shortcode to get the Portfolio excerpt. Is there no way to call it like this:
I'm just trying to find the reference that you are already currently using throughout the salient theme.
Thanks
Merging this here https://themenectar.ticksy.com/ticket/3366875#comment-17845945
ThemeNectar Support Team