-
AuthorPosts
-
October 23, 2014 at 11:16 am #339998
Hi there,
A website I’m working on relies on posts to show its content for various categories.
Within each category, when you view a post, is there anyway to control the side arrows to only show items within that category, rather than endlessly continue showing all posts on the site?Thanks,
Krissie
October 23, 2014 at 12:56 pm #340054Hi Krissie!
Please add following code to Functions.php file in Appearance > Editor
add_filter('avia_post_nav_settings','avia_same_category_filter', 10, 1); function avia_same_category_filter($settings) { $settings['same_category'] = true; return $settings; }
Cheers!
YigitOctober 23, 2014 at 2:24 pm #340088Will it get overwritten whenever I update the theme?
Thanks, :)
October 23, 2014 at 2:27 pm #340089Hey!
Yes, but you can use a child theme to avoid that – http://kriesi.at/documentation/enfold/using-a-child-theme/ :)
Regards,
YigitOctober 24, 2014 at 9:34 am #340522Will this affect all the pages etc that I’ve set up already? I don’t want to have to do it all again obviously!
I’m also not sure where to actually add that code…
Also, are you guys planning on creating an event plugin? There aren’t any that really work well within the theme. Can you recommend any?
Thanks,
Krissie :)
- This reply was modified 10 years, 1 month ago by Krissieg.
October 24, 2014 at 3:54 pm #340652Hey!
Your content is saved on your database so, no you are not going to need to re-create them. You can import parent theme options as shown in screenshot in the link i posted in my previous post.
Enfold is compatible with Events Calender and Events Calender pro plugins – http://tri.be/shop/wordpress-events-calendar-pro/?campaignid=12265&mbsy=6cr37
Best regards,
YigitOctober 24, 2014 at 4:36 pm #340678Thanks Yigit. I did try Events Calendar but it didn’t work very well when you click on a place.. the default post page looked dodgy to me.
Anyway, my client now wants to get rid of the side arrows completely, so I won’t need to do a child site anyway. Thanks for your help.
Is there a shortcode for hiding the side arrows? Also, is there any other way to navigate a user back to the previous page or to view other posts without relying on the browser back button or the main menu at the top?In other words, can we move the side arrow function below the share section within a post?
Thanks,
Krissie
October 25, 2014 at 3:39 am #340871Hey!
Thank you for the update. You can remove the avia post navigation with this:
#top .avia-post-nav { display: none !important; }
If you want to show a new kind of post navigation, you can edit includes > loop-index.php. Use the get_previous_post and get_next_post function. Please refer to the wordpress codex for more info.
Best regards,
IsmaelOctober 26, 2014 at 11:31 pm #341173Hi guys,
Isn’t there a quick edit option to show the arrows so they’re closer to the post edges? Rather than at the max sides of the screen?
If not, and I do end up keeping them is there any way I can have this code as a quick css edit?
add_filter(‘avia_post_nav_settings’,’avia_same_category_filter’, 10, 1);
function avia_same_category_filter($settings)
{
$settings[‘same_category’] = true;
return $settings;
}Where do I put it within the function.php file if not? Can it go anywhere?
Thanks! :)
October 27, 2014 at 6:54 pm #341675Hey!
You can add it to bottom of Functions.php file.
Please add following code to Quick CSS to.avia-post-nav .entry-info-wrap { width: 240px; }
Best regards,
YigitOctober 27, 2014 at 7:39 pm #341710Hey Yigit!
Thank you for this. Can I change the height of the side arrows too? So they’re towards the bottom of the page? Or is that too complicated?
October 27, 2014 at 7:41 pm #341714Hi!
No, not complicated at all. Please use following code in Quick CSS field and adjust the value as needed
#top .avia-post-nav { top: 80%; }
Best regards,
YigitOctober 27, 2014 at 7:47 pm #341721Thanks Yigit!
Oh and that code to stop the side bars from showing posts outside their category doesn’t work. I just put the code in the functions.php file at the bottom and it doesn’t work.
Is their a quick css code I can use?
xx
October 28, 2014 at 11:14 pm #342450Hey!
No that would not be possible with custom CSS code. Do you mind creating a temporary admin login and posting it here privately so we can look into it?
Regards,
YigitOctober 29, 2014 at 11:04 am #342644This reply has been marked as private.October 29, 2014 at 6:59 pm #342905Hey!
I have added the code to functions.php file successfully and checked, it is working fine. Please review your website now
Regards,
YigitOctober 29, 2014 at 8:59 pm #342975Hi Yigit!
That’s great! Many thanks!
So, when I update the theme, I need to remember to re-add the code?
:) x
-
AuthorPosts
- The topic ‘Is there a way to control what the side arrows show?’ is closed to new replies.