-
AuthorPosts
-
February 19, 2014 at 11:27 am #226107
Hi everyone,
Firstly I would like to say what a fantastic theme this is and its been a joy to work with it. Great work!
The one slight issue im having at the moment is on the Portfolio page and specifically on the internal portfolio entry individual pages. I need to be able to make each portfolio entry a child of the main portfolio landing page so that the menu shows we are still in the portfolio area. However the page attributes section is missing when I go to edit each item hence it not allowing me asign a parent & this is reflecting in the menu and url.
Any ideas?
Many thanks,
DFebruary 19, 2014 at 11:56 pm #226499bump
February 20, 2014 at 10:01 am #226654Can anyone shed any light on this? I noticed this was an issue on the demo site.
Cheers,
Danny- This reply was modified 10 years, 10 months ago by dxbizzle.
February 21, 2014 at 1:37 pm #227458Hey!
Unfortunately you can’t add a parent page/post to posts. Posts do not support a hierarchy like pages (parent > child pages) but you can assign them to categories. By default the breadcrumb will display the right structure if the user accesses the portfolio entry from a portfolio page though because Kriesi stores the page id of the portfolio grid page into a session variable and if the user views a portfolio post Enfold checks which portfolio grid directed the user to the portfolio post. I.e. if you go to http://kriesi.at/themes/enfold/portfolio/ and then click on “Single Portfolio: 2/3 Slider” the breadcrumb will show: Home / Portfolio / Single Portfolio: 2/3 Slider – you can also set a parent page for the “Portfolio” page and Enfold will add it to the breadcrumb (i.e. the structure would look like Home / Portfolio Parent Page / Portfolio / Single Portfolio: 2/3 Slider).
If you want to set a specific page as portfolio “parent” for all portfolio posts insert this code into the functions.php file:
function avia_modify_breadcrumb($trail) { if(get_post_type() === "portfolio") { $page = 20; if($page) { if($page == $front) { $newtrail[0] = $trail[0]; $newtrail['trail_end'] = $trail['trail_end']; $trail = $newtrail; } else { $newtrail = avia_breadcrumbs_get_parents( $page, '' ); array_unshift($newtrail, $trail[0]); $newtrail['trail_end'] = $trail['trail_end']; $trail = $newtrail; } } } else if(get_post_type() === "post" && (is_category() || is_archive() || is_tag())) { $front = avia_get_option('frontpage'); $blog = avia_get_option('blogpage'); if($front && $blog) { $blog = '<a href="' . get_permalink( $blog ) . '" title="' . esc_attr( get_the_title( $blog ) ) . '">' . get_the_title( $blog ) . '</a>'; array_splice($trail, 1, 0, array($blog)); } } return $trail; }
and replace 20 with the page id of your portfolio grid page.
Regards,
Peter -
AuthorPosts
- You must be logged in to reply to this topic.