Community Forums › Forums › Archived Forums › Design Tips and Tricks › A single Portfolio page with a Sidebar in Executive Pro
- This topic has 5 replies, 2 voices, and was last updated 9 years, 7 months ago by Brad Dalton.
-
AuthorPosts
-
September 1, 2014 at 11:29 am #122242Toon61Member
Hi all,
At the moment I'm very occupied re-designing my website, and moving from a non-genesis theme to a genesis-child-theme.
My child-theme of choice is Executive Pro.
Right now I'm doing my portfolio pages.
I want a single portfolio page with a sidebar where I can show client details, year of production, skills etc.
Also, I want navigation to go back and forth through my portfolio items.
How to do that within Executive Pro. Now my single portfolio pages are all centred (I want this left-aligned but that is easily altered through CSS) without an extra sidebar and without additional navigation. These are all the default setting in Executive Pro.For inspiration, check one of my current website's portfolio items: http://woohoodesign.nl/portfolio/modo-mio/
This is what I try to achieve.p.s.: A URL to my development environment is not possible, sorry about that.
September 1, 2014 at 11:45 am #122247Brad DaltonParticipantThe single cpt is already includes so add any PHP code directly to that template file and use the custom body class for styling.
You can add a custom sidebar to a single custom post type using the Genesis Simple Sidebars plugin
You could also hook in the post navigation above the primary sidebars using genesis hooks
September 2, 2014 at 3:01 am #122362Toon61MemberBrad,
The single cpt I use is 'single-portfolio.php' and that one already gets a custom class 'single-portfolio'.
I've made a sidebar with the GSS plugin, and named it 'portfolio-sidebar'.
Default in Executive Pro a single portfolio item is shown full width, so I deleted (commented out) this line form the singel-portfolio.php://* Force full width content layout /* add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); */
But now when I visit a single portfolio item I get two sidebars: 'The Primary Sidebar Widget Area' and my 'portfolio-sidebar' that I have placed (hooked) directly in the single-portfolio.php like this:
add_action('genesis_before_sidebar_widget_area','portfolio_sidebar'); function portfolio_sidebar() { genesis_widget_area( 'portfolio-sidebar', array( 'before' => '<div class="portfolio-sidebar widget-area">', 'after' => '</div></div>', ) ); }
This leaves two questions unanswered:
How to get rid of the default Primary Sidebar on these particular pages, but leave them on other pages, I tried this:
unregister_sidebar( 'sidebar' );
but that sidebar still shows up on every page that has a 'content-sidebar' layout, including the single portfolio.
How to populate my new 'portfolio-sidebar' with data form the Custom Fields (client details, year of production and so on).September 2, 2014 at 3:51 am #122370Brad DaltonParticipantHere's more about changing layouts http://wpsites.net/web-design/change-layout-based-on-any-conditions/
Please start a new topic for your second question.
September 2, 2014 at 4:21 am #122373Toon61MemberBrad
Forget my previous reply, I was thinking in the wrong direction.
I've got it all sorted out, well, almost.
Instead of using a sidebar to show additional data form Custom Fields, I got the page setup with two columns and show the additional info in the second column.
And to be honest, I was inspired by one of your great tutorials on showing data from Custom Fields (http://wpsites.net/web-design/how-to-create-a-custom-field/).September 2, 2014 at 4:27 am #122374Brad DaltonParticipant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.