Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #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

    #340054

    Hi 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!
    Yigit

    #340088

    Will it get overwritten whenever I update the theme?

    Thanks, :)

    #340089

    Hey!

    Yes, but you can use a child theme to avoid that – http://kriesi.at/documentation/enfold/using-a-child-theme/ :)

    Regards,
    Yigit

    #340522

    Will 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, 2 months ago by Krissieg.
    #340652

    Hey!

    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,
    Yigit

    #340678

    Thanks 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

    #340871

    Hey!

    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,
    Ismael

    #341173

    Hi 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! :)

    #341675

    Hey!

    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,
    Yigit

    #341710

    Hey 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?

    #341714

    Hi!

    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,
    Yigit

    #341721

    Thanks 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

    #342450

    Hey!

    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,
    Yigit

    #342644
    This reply has been marked as private.
    #342905

    Hey!

    I have added the code to functions.php file successfully and checked, it is working fine. Please review your website now

    Regards,
    Yigit

    #342975

    Hi Yigit!

    That’s great! Many thanks!

    So, when I update the theme, I need to remember to re-add the code?

    :) x

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Is there a way to control what the side arrows show?’ is closed to new replies.