-
AuthorPosts
-
October 2, 2018 at 9:14 pm #1017235
Have a look here:
I’m using the portfolio feature on two parts of the website. On this page clicking right goes to the next one in this category (projects), however as you can see if you click left it goes to a previous category which is in use on a different page on the website showing staff members (who we are). That I don’t want to happen. Can I limit the previous and next arrows to show only within the same category in each instance? If not I’ll have to not use the portfolio more than once which would I would like very much to do/
Thanks
Tony
October 3, 2018 at 6:48 am #1017363Hey Tony,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
NikkoOctober 3, 2018 at 6:36 pm #1017581This reply has been marked as private.October 4, 2018 at 6:56 am #1017716Hi Tony,
I don’t see the login link provided by the login which should give us access.
Or you can just provide us with temporary admin account, so any moderator available could access.Best regards,
NikkoOctober 4, 2018 at 5:18 pm #1017971log in below in private area
October 6, 2018 at 5:01 pm #1018525Hi tonyiatridis,
Thanks, I have added this code in functions.php of your child theme:
add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2); function enfold_customization_postnav($entries, $settings) { if($settings['type'] == 'portfolio') { $settings['same_category'] = true; $entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } return $entries; }
Let us know if you need further assistance.
Best regards,
NikkoOctober 6, 2018 at 5:20 pm #1018530Hey Nikko,
Thanks that worked like a charm. I notice though on b both of the pages that use the portfolio function:
That the navigational arrows seems to work in reverse. Meaning the forward arrow goes to the previous entry and vice versa. How do I make them function properly? I must be missing something
Thanks
Tony
October 6, 2018 at 5:22 pm #1018531That’s when you click down into the specific portfolio items of course, I gave you the top level pages as links where these portfolios are posted.
Thanks again.
October 6, 2018 at 5:31 pm #1018534just change the code to:
add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2); function enfold_customization_postnav($entries, $settings) { if($settings['type'] == 'portfolio') { $settings['same_category'] = true; $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } return $entries; }
October 6, 2018 at 5:42 pm #1018536Add to the main php file?
Adding just to that to the child theme’s php file causes a fatal error:
Fatal error: Cannot redeclare enfold_customization_postnav() (previously declared in /home/nycartdi/public_html/brookwood/wp-content/themes/enfold-child/functions.php:9) in /home/nycartdi/public_html/brookwood/wp-content/themes/enfold-child/functions.php on line 34
This code is already added to the child theme’s functions php file to tweak an issue with the portfolios staying within the same taxonomy:
add_filter( ‘avia_post_nav_entries’, ‘enfold_customization_postnav’, 10, 2);
function enfold_customization_postnav($entries, $settings)
{
if($settings[‘type’] == ‘portfolio’)
{
$settings[‘same_category’] = true;$entries[‘prev’] = get_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
$entries[‘next’] = get_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
}return $entries;
}Thanks
Tony
October 8, 2018 at 9:27 am #1018873Hi Tony,
Please replace the code I gave with the one Guenni007 gave.
That should make it work.
@Guenni007 thanks for helping out.Best regards,
NikkoOctober 9, 2018 at 5:21 pm #1019560Hey guys, sorry I misread that message from Guenni when I first read it, Doh. Works like a charm. Thanks so much.
October 9, 2018 at 6:07 pm #1019589Hi tonyiatridis,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.