Tagged: x
-
AuthorPosts
-
December 18, 2016 at 1:48 pm #1297329
STEVE HParticipantHi,
I would like to display the category on portfolio items in the Renew theme. I have seen discussions of this on the forum but I think they are outdated. I have a child theme set up, but there are no files in the folder yet. Can you tell me what file needs to be created, where it needs to be located in the folder directory, and how the code should be set up? (The site is under construction and in maintenance mode, so I will need to give you the login info if you need to look into this.)
site: watermarkarts.org
wordpress: 4.7
X theme: 4.6.4Thanks.
December 18, 2016 at 3:11 pm #1297356
NicoModeratorHi There,
Thanks for writing in.
In regards to which part that you need to customize, you could follow the linke below,
https://community.theme.co/forums/topic/renew-stack-modify-portfolio-page/
Although the code is outdated, you could follow which file you need to copy in order to customize.
Hope it helps.
Let us know it goes.
Thanks.
December 18, 2016 at 3:49 pm #1297376
STEVE HParticipantHi,
I’m sorry but this isn’t leading to a solution. The page you referred me to shows how to create a template-layout-portfolio.php page, but it doesn’t explain how to modify the code so that I can show the category under the title on portfolio images (in Renew). The page you sent me to says that the user’s request #2, which involved displaying the category name (on hover instead of “image”) would require customization outside your support. I understand if that’s the case. But a while back, you were able to guide me to adding the category to portfolio items on the index pages: https://community.theme.co/forums/topic/show-category-under-title-under-the-images-on-portfolio-index-page-in-ethos/
I was hoping for a similar solution for displaying the category with the title on individual portfolio items (as opposed to the index page). Thanks for looking again.December 18, 2016 at 4:03 pm #1297382
STEVE HParticipantThis may be what I am trying to do, but it is for Integrity, not Renew:
https://community.theme.co/forums/topic/display-the-portfolio-category/
To clarify what I’m trying to do: In Renew, when one hovers over a portfolio item on the index pages, you can see the post type, date, and title. I would like to display the category as well. (In my previous post, I mistakenly said I wanted to display the category on the individual portfolio item page, but I meant the index page that shows all the portfolio posts.)
December 18, 2016 at 9:32 pm #1297671
RadModeratorHi there,
Thanks for clarification 🙂
1. Copy this file VIEWS/RENEW/CONTENT-PORTFOLIO.PHP to your child theme (eg. /wp-content/themes/x-child/framework/views/renew/contet-portfolio.php
2. Edit that file and add this code just above or below this line
<span><?php echo get_the_date( 'm.d.y' ); ?></span><?php if ( has_term( '', 'portfolio-category', NULL ) ) { $categories = get_the_terms( get_the_ID(), 'portfolio-category' ); $separator = ', '; $categories_output = ''; foreach ( $categories as $category ) { $categories_output .= '<a href="' . get_term_link( $category->slug, 'portfolio-category' ) . '" title="' . esc_attr( sprintf( __( "View all posts in: “%s”", '__x__' ), $category->name ) ) . '"><i class="x-icon-bookmark" data-x-icon=""></i> ' . $category->name . '</a>' . $separator; } $categories_list = sprintf( '<span>%s</span>', trim( $categories_output, $separator ) ); } else { $categories_list = ''; } echo '<span>'.$categories_list.'</span>'; ?>3. Save and upload it.
Hope this helps.
December 19, 2016 at 7:40 am #1298105
STEVE HParticipantBrilliant, that worked perfectly. Thank you.
Now, a second request (which I should have mentioned earlier): How can I hide the post type (“image”) and date on the portfolio items (on hover)?
There are several forum posts about this, but none of them are working. (One CSS modification hides all the meta, another doesn’t do anything, etc.) Can this be done with CSS, or do we need to modify the contet-portfolio.php some more?
Thanks again. Your support team is fantastic.
December 19, 2016 at 8:06 am #1298136
Paul RModeratorHi,
You can add this under Custom > Edit Global CSS in the Customizer.
.x-portfolio .entry-cover-content span { display: none; }Hope that helps.
December 19, 2016 at 8:10 am #1298140
STEVE HParticipantThat was one of the CSS modifications I had tried, but unfortunately it also hid the Category. I want to display the title and category and hide the post type and date. Thanks again.
December 19, 2016 at 8:58 am #1298200
LelyModeratorHello Steve,
To help you better with this, can you give us admin credentials and sample page URL so we can be specific on our suggestion. The following might hide the date, but if it doesn’t work we need to check your structure.
.x-portfolio .entry-cover-content span+h2+span { display: none; }Hope this helps.
December 19, 2016 at 9:04 am #1298217
STEVE HParticipantThat helped. Thanks. It hid the date. Can we also hide the post type (“IMAGE”) which appears above the title, while still keeping the category?
December 19, 2016 at 10:59 am #1298362
JadeModeratorHi Steve,
Please try to add this code:
.x-portfolio .entry-cover-content span:first-child { display: none; }Hope this helps.
December 19, 2016 at 11:07 am #1298371
STEVE HParticipantThat hides the “IMAGE” text but also hides the category.
December 19, 2016 at 1:40 pm #1298553
DarshanaModeratorHi there,
Upon checking, I see that you have enabled maintenance mode. Could you please provide us a way to access your site, so that we can assist you with a possible workaround.
Thanks!
December 19, 2016 at 2:00 pm #1298583
STEVE HParticipantThis reply has been marked as private.December 19, 2016 at 11:02 pm #1299027
LelyModeratorHi There,
Thank you for that information.
Please try this custom CSS:.x-portfolio .entry-cover-content>span:first-of-type { display: none; }Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1297329 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
