Archived topic
Content.php edits
1 reply · Started by Steig on April 23, 2019
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
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 :)