Skip to content

Instantly share code, notes, and snippets.

@SuryawanshiPrajakta
Last active June 11, 2020 04:53
Show Gist options
  • Save SuryawanshiPrajakta/eb4c837a28152cd8b04befb7ea684877 to your computer and use it in GitHub Desktop.
Save SuryawanshiPrajakta/eb4c837a28152cd8b04befb7ea684877 to your computer and use it in GitHub Desktop.
Filter to display full content of post instead of excerpt.
1) Enable short excerpt under the Excerpt tab. Here, excerpt length will not make any effect. Refer here - https://cl.ly/f27e6a04fdea
2) Paste this code in your active theme's functions.php file -
add_action('uael_single_post_before_excerpt','custom_post_content',10,2);
function custom_post_content($post_id, $settings){
?>
<div class="uael-post__excerpt uael-custom-excerpt">
<?php the_content(); ?>
</div>
<?php
}
3) Paste the below CSS under Advanced settings -> Custom CSS tab
.uael-post__excerpt {
display: none;
}
.uael-post__excerpt.uael-custom-excerpt {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment