How do I set a value for $stripteaser using the functions.php file in a child theme so that when the_content() is called on post pages only the post exerpt is shown?

I have a theme that I am using. I am making a few modifications using a child theme. I want to modify it so on the post pages I only show the content that is post excerpt , with minimal impact to the main theme.

I am looking for a way to set the $stripteaser parameter for posts without overwriting the files in the main theme so that upgrades flow through.

  • What exactly are you trying to do? – Krzysiek Dróżdż Jul 3 '18 at 18:16
  • 1
    A read more button on a post page that hides/reveals the text that is not part of the exerpt. But I want to do this without overwriting the theme files using a child themes functions.php. the exerpt and the rest of the post must be formatted differently. – Edwin Raynor Jul 4 '18 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.