Tagged: x
-
AuthorPosts
-
July 25, 2016 at 11:32 pm #1102905
bradkerinParticipantHi 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,
July 26, 2016 at 3:09 am #1103089
ChristopherModeratorHi 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 credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
August 2, 2016 at 3:55 am #1113421
Rob VParticipant+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!
August 2, 2016 at 4:32 am #1113471
Paul RModeratorHi 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.
August 2, 2016 at 4:49 am #1113494
Rob VParticipantThanks 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?
August 2, 2016 at 5:11 am #1113520
Rob VParticipantWhen I changed entries.php in it’s original location it does work as expected! But now a solution for the childtheme 😉
August 2, 2016 at 5:30 am #1113545
Paul RModeratorHi 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.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1102905 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
