I currently have been adding my rev slider footer each of my pages but am not able to add them to the blog page or any posts (see attached images, first image home page, second image blog post). I would like to see if there is a way that I can just add the footer to all pages but it would need to be above the theme pro footer as that is being used for legal info
Hello @jordanlackey,
Thanks for writing in!
If you are using Pro theme, you can create a bar in your footer which will be exclusive to the rev slider only. You can have several bars in the footer and the very first bar would be for the rev slider.
Anyways, if you need to add the rev slider hard-coded into the child theme, then perhaps this code code can be added in your child theme’s functions.php file:
// Add a custom slider to Blog index
// =============================================================================
function custom_slider() {
if( is_home ) : ?>
<div class="x-container custom-slider" style="clear: both;">
<?php echo do_shortcode('[rev_slider alias="post"]'); ?>
</div>
<?php endif;
}
add_action('x_before_colophon_begin','custom_slider');
// =============================================================================
Just do not forget to change the rev slider shortcode in the code above: [rev_slider alias="post"]
Hope this helps. Kindly let us know.
Thanks for your reply!
When I try to add the rev slider footer in the pro theme footer it just shows a blank space (see first example image). I tried adding it as a content area as well as a widget.
When I added the code to the Pro-Child Theme’s functions.php the footer shows but covers the legal info footer from the pro theme as well as sections of the page itself (see image example below)
I have also provided a screenshot of the functions.php that I added just in case.
Hi @jordanlackey,
Thanks for reaching it.
It appears to be okay now for other pages, but there is no slider for a single post. I couldn’t compare it from your last screenshot, and maybe the reason it’s not there because that code is meant for home page only. You should change it to something like this’
// Add a custom slider to Blog index
// =============================================================================
function custom_slider() { ?>
<div class="x-container custom-slider" style="clear: both;">
<?php echo do_shortcode('[rev_slider alias="post"]'); ?>
</div>
<?php
}
add_action('x_before_colophon_begin','custom_slider');
// =============================================================================
But I wonder how it appears on your screenshot when it shouldn’t.
Thanks!
Hey Rad, I forgot to mention that the screenshots were from the staging site, not the live one so that’s why you saw a difference. Currently on live every page that has the rev slider has been added as a content area using the pro theme page content editor but the pages i can are as follows:
The blog page - https://www.justiceforme.com/blog/
Any single post pages -
– MEC Event posts - https://www.justiceforme.com/events/cle-ethics-luncheon-san-antonio-04-17-2019/
– Directories Listings posts - https://www.justiceforme.com/attorney/marcie-trevino-ripper/
Screenshots of the blog page with and without the php code you have replied with have been attached below. You can see once the code has been added it goes over the legal footer as well as the end of the blog page.
Hi @jordanlackey,
Yes, but you have removed it again which still and there is no way for me to actually check. I’m not referring to the comparison of its display or design, what I need to compare is the code so I can see how it overlaps. Please add the code again and let us check it first.
Thanks!
Gotcha. It is because I am using the staging site to edit the functions.php and show you previews, that is why you will not see the code on the live site as I want to make sure that everything looks correct before pushing staging to the live. In order for you to see the staging site, I will need to give you login access.
Hi @jordanlackey,
Sure, please provide the login credentials in the secure note. And sorry for the confusion as I’m a bit confused too as I can’t find the issue I should be checking
Thanks!
Ah that makes sense! I apologize for any confusion as well lol I have added the info in the secure note area above as well as updated links to the previous post and blog pages. Thanks!
Also: Currently both the child themes function php code as well as slider rev footer in the theme pro footer area are enabled which is why you will see that blank spot on the home page between the content and the legal info footer.
Hi @jordanlackey,
Thanks, I’m able to see it now. You don’t need to add the code above, your slider is already added as footer bar’s widget element. What’s left is removing the limiting height of your footer bar where the slider is. Please set its height to auto instead of 6em.
Thanks!
Thanks so much! That definitely worked. I really appreciate it, that will make things a lot easier in the future.
You’re welcome. Glad we’re able to help.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.