ResolvedPortfolio customisation
- This topic has 7 replies, 3 voices, and was last updated 2 years, 9 months ago by
ruben122.
- AuthorPosts
- June 12, 2020 at 3:21 pm #23580
ruben122
ParticipantHello,
I would like to remove the time & client name and add the short description on the portfolio grid view (see image)
image –> https://ibb.co/x1r1s6f
I’m working with the Child template, I moved the files from rigid to rigid-child: (image –> https://ibb.co/RBfcgqJ)
– page.php
– archive-rigid-portfolio.php
– partials –> single-rigid-porftolio.phpBut I can’t find where to change this, could you please specify which is the PHP file that I should use for this modification?
I modified single-rigid-porftolio.php but I can’t see any change.
Thanks in advance.
June 16, 2020 at 7:35 pm #23627ruben122
ParticipantThis reply has been marked as private.June 17, 2020 at 8:59 am #23646Althemist
KeymasterHello ruben122,
1. The time (date) can’t be removed. You can only visually hide it with CSS.
As for the client – just don’t enter client name.
2. I am afraid you can’t display short description in grid view. It’s only available in the list view.
It can be done with some modifications and the use of a child theme. I’ll ask our lead developer Alex to give you some directions.
Regards,
DimitarJune 17, 2020 at 10:32 pm #23714ruben122
ParticipantHI Dimitar,
1. Ok, perfect, done.
2. If Alex can give some guidelines, it will be great. We are already using the child theme, so no problem modifying some of the PHP files if that is needed.
Thanks in advance.
June 18, 2020 at 4:35 pm #23718Alex
KeymasterHello ruben122,
The file to edit is: rigid\partials\content-rigid_portfolio_category.php
You will find there where the .portfolio-unit container is build. It appears twice – one for list and another for grid views.So, to add the short description, you have to get it first by:
$rigid_short_desc = get_post_meta(get_the_ID(), 'rigid_add_description', true);
And then output it wherever you like.
Regards,
AlexJune 18, 2020 at 8:58 pm #23722ruben122
ParticipantHello Alex,
Thanks for your answer, I build the code as follows (following the list view) as in there the short description is already in place:
<?php endif; ?>
<?php $rigid_short_description = get_post_meta(get_the_ID(), ‘rigid_add_description’, true); ?>
<?php if ($rigid_short_description): ?>
<p><?php echo wp_trim_words($rigid_short_description, 40, rigid_new_excerpt_more(‘no_hash’)); ?></p>
<?php elseif (get_the_content()): ?>
<p><?php the_excerpt(); ?></p>
<?php endif; ?>Using child theme I updated the content-rigid_portfolio_category.php file, but anything happens, even if I inspect the code of the page, the code is not there.
I checked which templates this page is using, and I saw:
page.php
Footer file : rss-footer-embed.php
Header file : header.php
Header file : header-footer-base.php
Footer file : footer.phpSo I can’t see –> content-rigid_portfolio_category.php
The page is built as a regular WordPress page with wpbakery and the “module” called projects.
Any thoughts why is not working? It seems this page is not loading at all content-rigid_portfolio_category.php
Thanks in advance.
June 19, 2020 at 10:33 am #23723Alex
KeymasterHello ruben122,
Ok, so, the portfolio/project categories can be displayed in two main ways:
1. Through the native WordPress custom post type handling. For example, browsing:/portfolios/
2. Through the “Projects” shortcode placed on any normal page from WPBakery Page BuilderThe solution I gave you is for the first case.
But if you are using the shortcode, then you need to override the function defined in the rigid-plugin. This means, that you need to copy the function rigid_latest_projects_shortcode from wp-content\plugins\rigid-plugin\shortcodes\shortcodes.php to your child’s theme functions.php file and to put there the code for getting the short description as I sent you earlier.
Hope that makes sense.
Regards,
AlexJune 19, 2020 at 7:25 pm #23730ruben122
ParticipantHi Alex,
Thanks for the explanation, I tried but I could not get the description to appear. :S
Thanks again.
- AuthorPosts
You must be logged in and have valid license to reply to this topic.