GetSimple Support Forum

Full Version: get_page_excerpt() not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am building a test site and am having trouble getting get_page_excerpt(250, $file) to work. there are no errors in development tools, debug, errorlog, or on screen.

<section>
<a href="<?php echo $file; ?>" <- this works
<h2><?php echo $page; ?></h2> <-this works
</a><?php get_page_excerpt(250,$file);<- this doesn't work
//getPageContent($file); ?> <- this works
<p><a href="<?php echo $file; ?>">Read More...</a><- this works
</p>
</section>

Any suggestions?
What is $file?
This function does not expect $file
get_page_excerpt() displays an excerpt of the current page. It doesn't work for other pages, since there's no parameter to specify another page slug.

This may work for page with slug $slug :

Code:
<?php echo getExcerpt(returnPageContent($slug), 250); ?>
(2018-05-20, 16:33:23)Carlos Wrote: [ -> ]get_page_excerpt() displays an excerpt of the current page. It doesn't work for other pages, since there's no parameter to specify another page slug.

This may work for page with slug $slug :

Code:
<?php echo getExcerpt(returnPageContent($slug), 250); ?>

Thanks I will try this!