Hello, I’m hoping someone could help me with this problem because I could not find out what’s causing it.
I’m using Travelify on a portfolio website, and to manage my portfolio items I have installed a plugin that creates a custom post type that’s called ‘portfolio’. I wanted to design a custom layout for this post type, so I created the files ‘single-portfolio.php’ and ‘archive-portfolio.php’ in my child theme. With single-portfolio.php it’s working fine, but archive-portfolio is not working at all. When I visit my portfolio archive the website is just using the archive.php in the main Travelify theme instead of my custom file archive-portfolio.php in the child theme.
This is the link to my website with the portfolio archive: http://student.cmd.hro.nl/0861685/portfolio_category/portfolio-2/
I would be really glad if someone could help me with this because I’m completely lost with this problem.
I have never tested it with portfolio pages but I just gave it a try and it does work for me.
I used this tutorial: http://wp.tutsplus.com/tutorials/widgets/using-custom-post-types-to-create-a-killer-portfolio/
It is outdated and I had to use archive-portfolio.php
instead of page-portfolio.php
and some other tweaks were required but it worked like it should and I got my portfolio archive page working via Child Theme.
In some cases Child Theme files are not working as you save them and you have to publish a new article or update existing one to initiate wp-cron.
I tried the tutorial and it works.
However, with the way it works I have to create a seperate page and archive template for each portfolio type, because adding the portfolio types to my menu’s will just send me to a 404 error. I can’t use one archive template because I have multiple portfolio types with different portfolio items.
With the plugin I used before I can add portfolio categories to my menu’s, but those categories will use the main archive.php
template while they should use archive-portfolio.php
automatically, just like it does with single-portfolio.php
. I found out it’s not related to travelify because I have the same problem with Twenty Thirteen, but do you have any idea how I can fix it?
After a lot of time spend on google, I finally found the solution :). Because the taxonomy category portfolio_category
was registered by the plugin, I needed to use taxonomy-portfolio_category
instead of archive-portfolio
, and that works like a charm. Thanks for your help though, it’s much apppreciated.