Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1102905
    bradkerin
    Participant

    Hi there,

    I am using the Ethos Stack have added a revolution slider below the masthead on my blog posts index page here – http://members.carbonmarketinstitute.org/blog/

    I would like to add that slider to the individual post pages themselves – http://members.carbonmarketinstitute.org/welcome-to-carbon-exchange/

    Whilst not toally in the scope of the theme, I have seen that it is possible to add this in the Global stack, by adding the code from this post – https://community.theme.co/forums/topic/add-revolution-slider-below-masthead-on-individual-post-pages/

    I have tried adding some version of the code to my Ethos child theme but it doesn’t work. Is there some part of that code that I can use to get the Blog index page slider on each of the individual ethos post pages?

    Thanks,

    #1103089
    Christopher
    Moderator

    Hi there,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1113421
    Rob V
    Participant

    +1 for me 😉
    I also want to have the possibility to choose and add a (revolution)slider below masthead on an individual postpage (just as it is on regular pages)

    Looking forward to a solution for that!

    Thanks!

    #1113471
    Paul R
    Moderator

    Hi Rob,

    I will forward this to our web development team as feature request.

    For the meantime you can add this in your child theme’s functions.php file.

    
    function add_slider(){
      if ( is_singular('post') ){ ?>
    
         echo do_shortcode('[rev_slider alias="agency-home"]');
        
      <?php }
    }
    add_action('x_after_view_global__slider-below', 'add_slider');
    

    Change [rev_slider alias="agency-home"] with your slider shortcode.

    http://screencast.com/t/W5NeLfGFM1sX

    Hope that helps.

    #1113494
    Rob V
    Participant

    Thanks for your very quick reply…awesome!

    But your answer doesn’t reflect my wishes 😉 I do not want the same slider on every blogpost, but I want (as in regular pages) to choose for every single post a slider in a meta box.

    I found the responsible meta box in x/framework/functions/global/meta/entries.php. Copied that file into childtheme/functions/global/meta/entries.php. I copied the responsible metabox //Sliders section into the x_add_post_meta_boxes section and changed the ‘page’=>’page’ array to ‘page’ =>’post’

    Nothing happened in the backend…no possibility to choose a slider. What am I doing wrong?

    #1113520
    Rob V
    Participant

    When I changed entries.php in it’s original location it does work as expected! But now a solution for the childtheme 😉

    #1113545
    Paul R
    Moderator

    Hi Rob,

    Sorry there is a syntax error in the code I provided above.

    We can edit it so you can select which slider to display in each of your post.

    Please change the code to this.

    
    function add_slider(){
        global $post;
      if ( is_singular('post') && ($slider =  get_post_meta($post->ID, 'slider_below', true))){       
         echo do_shortcode('[rev_slider alias="'. $slider .'"]');
         }
    }
    add_action('x_after_view_global__slider-below', 'add_slider');
    

    You can then add a custom field slider_below and add the alias of the slider as the value.

    Enable Custom fields in posts

    http://screencast.com/t/E0UUpbXS

    Add custom field

    http://screencast.com/t/UK0qqLSBH

    Slider Alias

    http://screencast.com/t/D3JWeBJY50

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1102905 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>