• Resolved msgrpusher

    (@msgrpusher)


    Hello. How can I override /wp-content/plugins/photo-gallery/frontend/views/view.php (after plugin updating the changes should persist)?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kima Baghdasaryan

    (@kimabaghdasaryan)

    Hi,

    To override the view.php file in the Photo Gallery plugin and ensure that your changes persist after updating the plugin, you can use a child theme.

    Thanks!

    Thread Starter msgrpusher

    (@msgrpusher)

    @kimabaghdasaryan Thank you. What should be the directory structure in a child theme? Where exactly do I need to place the view.php file?

    Plugin Support Kima Baghdasaryan

    (@kimabaghdasaryan)

    Hi,

    Please check the following screenshot:

    • mytheme-child/ is the directory for your child theme.
    • style.css is the stylesheet for your child theme. This file is necessary for WordPress to recognize the child theme.
    • photo-gallery/ is a directory within your child theme where you replicate the directory structure of the Photo Gallery plugin.
    • frontend/ is a subdirectory within photo-gallery/, mirroring the structure of the plugin.
    • views/ is a subdirectory within frontend/, which is where the view files are located in the plugin.
    • view.php is the file you want to override from the Photo Gallery plugin. Place your modified version of this file in the views/ directory of your child theme.

    Thanks!

    Thread Starter msgrpusher

    (@msgrpusher)

    @kimabaghdasaryan I did everything as you wrote. I placed the file here /wp-content/themes/MY_THEME/photo-gallery/frontend/views/view.php, made changes in view.php, but nothing changed on the site.

    Plugin Support Yasin Abedi

    (@yasinabedi)

    Hi @msgrpusher ,

    I sincerely apologize for the misinformation we have previously provided. We want to assure you that we’re committed to providing accurate and helpful information.
    Unfortunately there is no way to override the view.php file in a way that the changes would stay intact after the plugin update, as updates will always override?the view.php file.

    Thank you for your patience and understanding.

    Best Regards,
    Yasin

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Override view.php’ is closed to new replies.