Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #567660
    #568362

    Hey masuurikas,

    1. I’m not sure but setting a margin on the share buttons doesn’t seem to work, it might have something to do with them being displayed as table cell, maybe you could try inline or inline-block to see if that works better?

    2/3. You can save templates with the items you need, I think that would be the easiest way to amend items to posts.

    Regards,
    Rikard

    #569198

    Okay, I will try it out.

    2/3 the problem is, that in this case SOCIAL SHARE will display at the very bottom, which would be not logical, since sharing should be right below the blog post.

    Still, if I wanted to have BLOG POST SLIDER and PRODUCT SLIDER below the blog post, which kind of PHP tag should I include? And where should I include it?

    Thank you for you help!

    #571043

    Hi There. Any idea about this one?

    Still, if I wanted to have BLOG POST SLIDER and PRODUCT SLIDER below the blog post, which kind of PHP tag should I include? And where should I include it?

    #572662

    Hey!

    Please try this in the functions.php file:

    add_filter('ava_after_content', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod() {
       if(is_singular('post')) {
    	    $output  = do_shortcode("[av_postslider link='category' columns='3' items='9' offset='0' contents='excerpt' preview_mode='auto' image_size='portfolio' autoplay='no' interval='5']");
                echo $output;
       }  
    }

    Adjust the post slider shortcode as needed.

    Regards,
    Ismael

    #572681

    Hi Ismael. I think it does not work. Please check. I added the script to functions.php file, but I don’t see any slider here on blog page: http://www.oot-oot.com/en/diy-projects-picked-for-november/

    • This reply was modified 8 years, 9 months ago by masuurikas.
    #573528

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Thanks,
    Rikard

    #573597

    Hi Rikard, admin login is granted. See details in private content.

    #574368

    Hey!

    We modified the code a bit:

    add_filter('ava_after_content', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod($the_id) {
       if(is_singular('post')) {
    	    echo do_shortcode("[av_postslider link='category,1,32,133,102,120,33,118,14' columns='4' items='8' offset='no_duplicates' contents='excerpt' preview_mode='auto' image_size='portfolio' autoplay='no' interval='5']");
       }
    }

    Please add this in the Quick CSS field in order to fix the social share position.

    #top .fullsize .template-blog .post .entry-content-wrapper .entry-footer:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: " ";
        clear: both;
        height: 0;
    }
    
    #top .fullsize .template-blog .post .entry-content-wrapper .entry-footer .av-share-box {
        margin-bottom: 50px;
        padding: 0;
    }

    Best regards,
    Ismael

    #574376

    Thank you. Is it possible to show this slider below blog post the same way and style like it appear on front page? http://www.oot-oot.com/en/. You see it’s full with, perfect square images and only title below image.

    #575524

    Hi!

    You can replace the code with this:

    add_filter('ava_before_footer', 'ava_after_main_container_mod', 20, 1);
    function ava_after_main_container_mod($the_id) {
       if(is_singular('post')) {
    	   $output = '<div id="av_section_1" class="avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize">';
    	   $output .= '<div class="container">';
    	   $output .= '<div class="template-page content  av-content-full alpha units">';
    	   $output .= do_shortcode("[av_postslider link='category,1,32,133,102,120,33,118,14' columns='4' items='8' offset='no_duplicates' contents='excerpt' preview_mode='auto' image_size='portfolio' autoplay='no' interval='5']");
    	   $output .= '</div>';
    	   $output .= '</div>';
    	   $output .= '</div>';
    	   echo $output;
       }
    }

    Regards,
    Ismael

    #575547

    I see that it works: http://www.oot-oot.com/en/nordic-lifestyle-blogs-read/.

    1) And if I want to have 2 sliders with a bit of headlines there, should I just copy this script twice in the functions.php file and change the categories? So, if I would like to achieve something like this: http://www.oot-oot.com/wp-content/themes/oot-oot/images/2-sliders.jpg

    2) Oh and, by the way, the space between the social buttons and slider is quite big there.

    #575571

    Hey!

    1.) Yes, you can duplicate the code but you have to change the function name.

    2.) Please change this line:

    $output = '<div id="av_section_1" class="avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize">';
    

    .. to:

      $output = '<div id="single-post-slider" class="avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize">';
    

    Add this in the Quick CSS field:

    single-post-slider {
        margin-top: -100px;
    }

    Best regards,
    Ismael

    #575582

    If I want to add another slider there, do you mean that I should rename this part and that’s it? Can I name it to whatever I want? For example ava_after_postslider_container_mod?

    add_filter(‘ava_before_footer’, ‘ava_after_footerposts_container_mod‘, 20, 1);
    function ava_after_footerposts_container_mod($the_id) {

    • This reply was modified 8 years, 8 months ago by masuurikas.
    #575621

    Hey!

    Yes, that’s it and adjust the “links” or category ids parameter in the shortcode. This part:

    link='category,1,32,133,102,120,33,118,14'
    

    Or you might want to use the product slider instead. Example:

    [av_productslider columns='3' items='9' offset='0' sort='0' autoplay='no' interval='5']
    

    Regards,
    Ismael

    #575625

    I see, I will try it. Can I also have a title, some text before each of these sliders? I would love to show a title in front of each slider, so it’s clear, what each slider is about.

    #575642

    And I added both these scripts in my functions.php file as you can see below. Changed the category ID-s. But I see only one slider appearing under blog post? How can I have 2 of them with titles before each slider? As you can see, only one slider: http://www.oot-oot.com/en/nordic-lifestyle-blogs-read/

    These are the functions I included as you recommended:

    add_filter(‘ava_before_footer’, ‘ava_after_main_container_mod’, 20, 1);
    function ava_after_main_container_mod($the_id) {
    if(is_singular(‘post’)) {
    $output = ‘<div id=”single-post-slider” class=”avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize”>’;
    $output .= ‘<div class=”container”>’;
    $output .= ‘<div class=”template-page content av-content-full alpha units”>’;
    $output .= do_shortcode(“[av_postslider link='category,1,32,133,102,120,33,118,14' columns='4' items='8' offset='no_duplicates' contents='title' preview_mode='auto' image_size='masonry' autoplay='no' interval='5']“);
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    echo $output;
    }
    }

    add_filter(‘ava_before_footer’, ‘ava_after_postslider_container_mod’, 20, 1);
    function ava_after_postslider_container_mod($the_id) {
    if(is_singular(‘post’)) {
    $output = ‘<div id=”single-post-slider” class=”avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize”>’;
    $output .= ‘<div class=”container”>’;
    $output .= ‘<div class=”template-page content av-content-full alpha units”>’;
    $output .= do_shortcode(“[av_postslider link='category,100,140,139,136,138,172,171,170,169,168,137' columns='4' items='8' offset='no_duplicates' contents='title' preview_mode='auto' image_size='masonry' autoplay='no' interval='5']“);
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    echo $output;
    }
    }

    • This reply was modified 8 years, 8 months ago by masuurikas.
    #576304

    Hi!

    It didn’t produce an error? It should because the function names are the same. Change the function name like I said on my previous post then adjust the offset parameter of the shortcodes from “no_duplicates” to “0” (deactivate offset). https://kriesi.at/support/topic/single-post-template-with-post-slider-and-social-share/#post-575571

    Regards,
    Ismael

    #577593

    Hi,

    In my opinion I did exactly as you wrote. I renamed the function name, now also deactivated offset. Still, when I look at the post, I see only 1 slider there: http://www.oot-oot.com/en/nordic-lifestyle-blogs-read/

    This is what I have in FUNCTIONS.PHP file:

    1)
    add_filter(‘ava_before_footer’, ‘ava_after_main_container_mod’, 20, 1);
    function ava_after_main_container_mod($the_id) {
    if(is_singular(‘post’)) {
    $output = ‘<div id=”single-post-slider” class=”avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize”>’;
    $output .= ‘<div class=”container”>’;
    $output .= ‘<div class=”template-page content av-content-full alpha units”>’;
    $output .= do_shortcode(“[av_postslider link='category,1,32,133,102,120,33,118,14' columns='4' items='8' offset='0' contents='title' preview_mode='auto' image_size='masonry' autoplay='no' interval='5']“);
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    echo $output;
    }
    }

    2)
    add_filter(‘ava_after_postslider’, ‘ava_after_postslider_container_mod’, 20, 1);
    function ava_after_postslider_container_mod($the_id) {
    if(is_singular(‘post’)) {
    $output = ‘<div id=”single-post-slider” class=”avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize”>’;
    $output .= ‘<div class=”container”>’;
    $output .= ‘<div class=”template-page content av-content-full alpha units”>’;
    $output .= do_shortcode(“[av_postslider link='category,100,140,139,136,138,172,171,170,169,168,137' columns='4' items='8' offset='0' contents='title' preview_mode='auto' image_size='masonry' autoplay='no' interval='5']“);
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    echo $output;
    }
    }

    #578136

    Hi there, what do you think of these 2 functions? It does not seem to work the way you suggested. I have put 2 scripts in FUNCTIONS.PHP file, but I only see 1 slider. This is what I would like to achieve, 2 sliders with 2 headlines above each slider: http://www.oot-oot.com/wp-content/themes/oot-oot/images/2-sliders.jpg. I would appreciate if you could help me out how exactly I should edit the functions.php file to achieve this.

    Thank you!

    #578186

    I think I got it now : ) Actually, instead of 2 scripts I had to add 2 shortcodes in one script. So the script would look like this…

    add_filter(‘ava_before_footer’, ‘ava_after_main_container_mod’, 20, 1);
    function ava_after_main_container_mod($the_id) {
    if(is_singular(‘post’)) {
    $output = ‘<div id=”single-post-slider” class=”avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll container_wrap fullsize”>’;
    $output .= ‘<div class=”container”>’;
    $output .= ‘<div class=”template-page content av-content-full alpha units”>’;
    $output .= do_shortcode(“[av_heading heading='LOE VEEL: ' tag='h3' style='blockquote modern-quote modern-centered' size='23' subheading_active='' subheading_size='15' padding='10' color='custom-color-heading' custom_font='#222222'][/av_heading]“);
    $output .= do_shortcode(“[av_postslider link='category,42,58,135,127,124,123,122,131' columns='4' items='-1' offset='0' contents='title' preview_mode='custom' image_size='portfolio' autoplay='no' interval='5']“);
    $output .= do_shortcode(“[av_heading heading='MEIE TOOTED: ' tag='h3' style='blockquote modern-quote modern-centered' size='23' subheading_active='' subheading_size='15' padding='10' color='custom-color-heading' custom_font='#222222'][/av_heading]“);
    $output .= do_shortcode(“[av_postslider link='portfolio_entries,137,168,169,170,171,172,138,179,136,139,140,100' columns='4' items='-1' offset='0' contents='title' preview_mode='custom' image_size='portfolio' autoplay='no' interval='5']“);
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    $output .= ‘</div>’;
    echo $output;
    }
    }

    #578322

    Hey!

    Great! Glad you figured it out. :)

    Cheers!
    Ismael

    #578460

    Thanks Ismael! We can close the topic now! Great theme you have there and great support!

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Single post template with post slider and social share’ is closed to new replies.