Community Forums › Forums › Archived Forums › General Discussion › Remove Genesis box from Portfolio Page
Tagged: conditionals, minimum, portfolio
- This topic has 8 replies, 3 voices, and was last updated 12 years, 5 months ago by
Hard Boiled Greg.
-
AuthorPosts
-
February 7, 2013 at 4:00 pm #18754
jonbuscall
MemberI love the Minimum theme but I can't get the Genesis Call-Out Box at the end of posts that I created to not appear on Portfolio posts to.
Does anyone know the conditional I need to use to ensure the call-out-box doesn't get put on portfolio pages.
Thanks.
February 8, 2013 at 1:25 am #18875Hard Boiled Greg
MemberI hate posting untested code, but:
if ('portfolio' == get_post_type())
will check to see if the current post is the portfolio post type.
Let me know how it goes.
HBG
Website: Hard Boiled Greg Twitter: @hbgreg
February 8, 2013 at 2:07 am #18882jonbuscall
MemberNope. Didn't work I'm afraid.
I am using: is_single()
to hook the call-out-box after the blog post, but if (‘portfolio’ == get_post_type()) does not remove it from the portfolio pages. It just creates a server error.
But thanks for your suggestion.
February 8, 2013 at 2:43 am #18884Brad Dalton
ParticipantUse a conditional tag with the Widget Logic plugin to remove the custom after post widget.
! if ( 'portfolio' == get_post_type()
What do you mean by the call out box? Are you referring to the Genesis eNews extended widget?
If its a widget, you can use that conditional tag.
Can you paste a url to the exact portfolio post.
February 8, 2013 at 3:14 am #18894jonbuscall
MemberThat didn't work either.
It's not a widget.
URL: blog post http://jontusmedia.com/should-you-put-a-video-or-slider-on-your-website/
portfolio post: http://jontusmedia.com/portfolio/e-commerce-site/ (This is the page I want the call-out box removed)
Thanks.
February 8, 2013 at 4:00 am #18904Brad Dalton
ParticipantThe audit-box after your posts correct?
If so, add a custom post class to the custom post type in your child themes functions.php file and use that class as the selector to display none using CSS.
This code will remove the audit box from the post with i.d 4833
.postid-4833 #audit-box { display:none; }
Or remove the audit box from all posts assigned to the Portfolio post type after adding a custom post class to the portfolio post type:
.custom-post-class #audit-box { display:none; }
Or add the conditional ! if ( 'portfolio' == get_post_type() to your custom coding used to create and display the audit-box
February 8, 2013 at 4:07 am #18905Brad Dalton
ParticipantWould be easier to create an after post widget area for your audit box and add the conditional tag to code or add it to the widget using the Widget logic plugin.
February 8, 2013 at 4:35 am #18908Brad Dalton
ParticipantHere's an easier way:
.single-portfolio #audit-box { display:none; }
February 8, 2013 at 7:22 am #18915Hard Boiled Greg
MemberHi,
No, if (‘portfolio’ == get_post_type()) won't remove it on it's own, it is just the conditional to check to see if the current post is the portfolio post type, you would then have to tell it what to do if the condition is true.
Would you mind posting the code you are using to create the call-out box, and I'll help you with the conditional.
Thanks,
HBG
Website: Hard Boiled Greg Twitter: @hbgreg
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.