[Support request] Content.php edits

Home Forums Support [Support request] Content.php edits

Home Forums Support Content.php edits

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #877014
    Steig

    Hello,
    I wanted a popup plugin to cause all post detail pages to launch as popups. The plugin publisher wants a statement inserted into the contents.php file to accomplish this. But then warned that updating the theme will wipe it out. Here’s the code:

    the_title( sprintf( '<h2 class="entry-title" itemprop="headline"><a class="sg-iframe-popup-133" href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
    

    That added the sg-iframe-popup-133 statement. Is there a better way to accomplish this so I’m not at risk with theme updates?

    Thanks

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #877061
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can copy the content.php file and add it to your child theme: https://docs.generatepress.com/article/using-child-theme/

    Then you can make changes to it without losing those changes when you update.

    Let me know if you need more info 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.