New Front EN › Support Forums › Ikebana Theme Support › Multiple Pages with different Portfolio page
- This topic has 21 replies, 6 voices, and was last updated 10 years, 5 months ago by selj634.
-
AuthorPosts
-
September 18, 2013 at 5:04 am #1691chaoParticipant
As per title, can I do that? How?
September 18, 2013 at 4:22 pm #1699satoriKeymasterHey Chao,
I am not sure I understood what you mean – please clarify, did you have in mind several portfolio pages each displaying its own portfolio items?
Sincerely,
Andrew / Satori StudioSeptember 22, 2013 at 8:52 am #1719chaoParticipantYes, can we make multiple portfolio pages, each has different portfolio items.
September 23, 2013 at 9:05 am #1722satoriKeymasterHey Chao,
Ikebana envisages only one template for the portfolio page, and all pages with that template will display all “project”-type items. One possible workaround is to use portfolio tag archive pages, e.g. this one in the demo. The tag archives are generated automatically and display portfolio items belonging to a particular tag; they have an URL of the form: yourwebsite.com/tag-portfolio/name where “name” is the name of the portfolio tag. You can add portfolio tag archive pages to the menu in “Appearance -> Menus” (in case tags are not shown among the menu insertion options, please click the top-right “Screen Options” tab and choose both “Tags” checkboxes from the list.
Please let me know if this addresses your needs!
Sincerely,
Andrew / Satori StudioSeptember 25, 2013 at 2:57 am #1733chaoParticipantAll right, I didn’t think about that.
March 22, 2014 at 4:50 pm #2817sdanpoParticipantAndrew ,
I have a question.
I tried this solution and it seemed like the project always showed on both the tag page and the portfolio page.
Is it possible to make it appear only on the tag page and Not on the Portfolio page ?Thanks,
DanMarch 24, 2014 at 3:21 am #2820satoriKeymasterHey Dan,
in principle, the portfolio page template displays all projects there are, and the tag archive pages display only the projects with a specific tag. There are two ways to proceed here – either use tag archive pages in both cases, so that projects are always separated according to their tags, or customize the WP_Query object in the “page_portfolio.php” template to exclude projects with a certain tag. If you choose the second path, I might be able to help you in constructing the custom query.
Sincerely,
Andrii / Satori StudioMarch 24, 2014 at 4:17 am #2822sdanpoParticipantHey,
Thanks a lot for the answer .
I highly appreciate your will to help!
Will be in touch later on when I have the need complete in my8 head.Thanks,
DanMay 25, 2014 at 10:17 am #3360orenParticipantHello Andrew,
This is exactly what I want to achieve!
But, I can’t find the way to exclude certain “tagportfolio” ID from the general portfolio… can you please give me a hint?
in the “page_portfolio” template I tried:
$stycky_query = new WP_Query( array( ‘post_type’ => ‘project’, ‘meta_key’ => ‘satori_post-sticky’, ‘tagportfolio__not_in’ => array( 34 )) );
…to exclude the projects tagged with tagportfolio’s ID: 34.
not working :(
Your help is much appreciated!
Oren
May 26, 2014 at 12:35 pm #3364satoriKeymasterHey Oren,
the WP_Query object has an option to include or exclude certain items of custom taxonomies, but you’d need to use the tax_query parameter in this case, e.g. on line 69 in the page_portfolio.php theme file:
$wp_query = new WP_Query( array( 'posts_per_page' => $ppp , 'post_type' => 'project' , 'paged' => $paged , 'post__not_in' => $exclude_ids, 'order' => $order, 'orderby' => $orderby, 'tax_query' => array( array( 'taxonomy' => 'tagportfolio', 'field' => 'slug', 'terms' => array( 1, 2, 3 ), 'operator' => 'NOT IN' ) ) ) );
replacing the “1”, “2”, “3” etc with the slugs of the portfolio tags (“Portfolio -> Tags” admin section) you wish to exclude from the portfolio page.
Sincerely,
Andrii / Satori Studio -
AuthorPosts
- You must be logged in to reply to this topic.