Get the WordPress travelify theme image slider to show up on every page

Hey guys,

I’m pretty new to wordpress and webdesign, it really is a great experience to start with this theme, it works like a charm and I learn more step by step every day. Thanks for your work!

One thing I can’t get to work as I want it to, is the slider. It works fine but will only show up on the front page, is there anything I’m missing here? I’d like the slider to show up on every page.

Thanks for your help.

Bionic

I am having the same issue.

In particular, I have a website in 3 languages and I need the slider to show up at least on the homepage for each language, but it only appears on the English page.

There is no option to enable slider on all pages via Theme Options but it is fairly easy to modify theme code to make slider work everyhwere.

First of all you should find 2nd functions.php file that you can find in travelify theme folder >> library >> functions >> functions.php

On that file you will find code like this:

if( ( is_home() || is_front_page() ) && "0" == $options[ 'disable_slider' ] ) {
	wp_enqueue_script( 'travelify_slider', get_template_directory_uri() . '/library/js/slider-settings.min.js', array( 'jquery_cycle' ), false, true );
}

Now remove first and last line so only this line remains in place:

wp_enqueue_script( 'travelify_slider', get_template_directory_uri() . '/library/js/slider-settings.min.js', array( 'jquery_cycle' ), false, true );

Now open header-extensions.php file that you can find in travelify folder >> library >> structure. One that file you will find code that looks like this:

if( is_home() || is_front_page() ) {
if( "0" == $options[ 'disable_slider' ] ) {
	if( function_exists( 'travelify_pass_cycle_parameters' ) )
		travelify_pass_cycle_parameters();
	if( function_exists( 'travelify_featured_post_slider' ) )
		travelify_featured_post_slider();
	}
}

Remove first and the last line, so it looks like this:

if( "0" == $options[ 'disable_slider' ] ) {
	if( function_exists( 'travelify_pass_cycle_parameters' ) )
		travelify_pass_cycle_parameters();
	if( function_exists( 'travelify_featured_post_slider' ) )
		travelify_featured_post_slider();
	}

Now slider for Travelify theme will be present on all pages without exceptions.

Thanks Aigars, worked perfectly. Appreciate your work!

Hey Aigars!

It seems you really know you stuff…I don’t, to be honest with you. I’m working on it, and parts of my site are coming together, but this little thing is driving me crazy.

I want to do the same thing: add my slider to all my pages, but I can’t find a theme ‘folder’ with a ‘library’ subfolder anywhere in my dashboard. How do I find that? I feel really, really stupid now…like I’m missing the most obvious thing in the world…is that the same or different than the ‘Editor’ tab listed under ‘Appearance’ in the dashboard? Because I couldn’t find that particular piece of code you mentioned.

Thanks so much!

Austin

Austin,

These files can’t be accessed via WordPress dashboard and you have to either access theme via FTP or via your hosting’s control panel as they probably have some file editor of some sort.

Let me know if you need any further assistance.

Hey Aigars,

I tried those changes, and I unfortunately got that ‘white screen of death’ that happens when someone messes with the code without knowing what they’re doing. Here are some some screenshots of what I changed…what did I mess up there?

Austin,

You managed to break your website because you changed code inside function “travelify_alter_home” but you didn’t have to touch it at all.

Please read my tutorial about to see which lines you had to change.

Ah yes, I see now! I guess I didn’t look as closely at the code and changed the wrong place…totally my bad!

Everything’s working now - you are the best! Thank you!

:slight_smile:
:slight_smile:
:slight_smile:

No problem at all. I’m glad I could help :slight_smile: