Closed kernel52 closed 6 years ago
I guess I have to work on the photography-portofolio folder for this. No chance of creating a second one.
Hi Nikolas, Sorry I missed your ticket when you submitted it the first time.
When you create a new portfolio layout with a slug, for example grid
- you can use that slug in all files to modify layout for that particular layout.
Everything that lives in templates
directory can be copied to yourtheme-directory/photography-portfolio
.
So for example if you want to replace portfolio-entry.php
with your theme code, you can create a new file in your theme, like this:
templates/single/portfolio-entry.php
your-theme-directory/photography-portfolio/single/portfolio-entry.php
Furthermore, if you want to only change the contents of portfolio-entry.php
for grid
layouts - you can do that by appending -{slug}.php
to the file. In this example, it would look like this:
your-theme-directory/photography-portfolio/single/portfolio-entry-grid.php
But it can also be
your-theme-directory/photography-portfolio/single/layout-grid.php
or
your-theme-directory/photography-portfolio/single/description-grid.php
I hope that makes sense.
ah! it all makes sense! I did not want to stress you at all!
After all, providing this as a free plugin, I can only be grateful if you have time to answer questions, but would never complain if I got no answer. I was really going for the simple solution of overriding the templates in the end ;)
But thanks a lot taking time to reply, I will work this way and hopefully won't bother you more :)
Thanks a lot again for your time, Nikolas
Hi Norris,
coming back to my efforts on creating a new template as masonry is not exactly what I want.
I am using minimalist-portofolio as my basis, and try to create a new template for a single portofolio.
I followed your wiki, plus your suggestions on my previous question, I can see that my new template can be selected on the back-end, and I can also have my custom thumbnail size.
Now the next question would be, that after declaring and switching to the new template, WP is loading the files from the plugin folder under photography-portfolio/public/templates/single. [portofolio-entry.php which is loading files under photography-portfolio/public/templates/gallery]
What is the structure to use, to create a new set of files under my template folder? Kind as like you did with photography-portofolio folder, where you only override the description.php?
Would a similar folder structure under the name of my layout slug suffice?
I attach again the declaration of my template for reference.
Thanks, Nikolas