• Resolved imcobarn

    (@imcobarn)


    Hi,

    Thank you for the great plugin.

    Little confused about over riding template files.
    You say it’s same as Woocommerce.

    In your index file it says :
    “public/templates/
    * That magical direcotry where the plugin looks for layouts.
    * Copy this to your /theme/portfolio/ and override what you must.”

    I added folder /portfolio/ in my theme and added public/templates/ folder to it but it is not overriding templates.

    Tried changing folder to /photography-portfolio/ but still nothing.
    What is the structure need to be?
    /mytheme/photography-portfolio/public/templates/
    OR
    /mytheme/portfolio/public/templates/

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author justnorris

    (@justnorris)

    Hey there,
    Sorry for the confusion. I wrote that comment in the first iteration and haven’t updated it. The directory is now called (and always will be) “photography-portfolio”.

    So you can copy, for example:
    /easy-photography-portfolio/public/templates/archive/layout.php
    to
    /your-theme/photography-portfolio/archive/layout.php

    One thing to keep in mind – at the moment I don’t have any fancy template file version detection. You have to keep an eye out for changes in the changelog. Or use actions when you can.

    For example, if you only need to append/prepend at a certain template part – you might find this hook useful: https://github.com/justnorris/easy-photography-portfolio/blob/master/Photography_Portfolio/Frontend/Template.php#L32

Viewing 1 replies (of 1 total)
  • The topic ‘template files in the theme’ is closed to new replies.