Replies: 0
My website is http://www.edumuffin.com/ (hompage)
This website is built using Listify WordPress theme.
I want to have a slider in the homepage for which I am using the plugin Slider Revolution. The thing is I want the slider to be in place of the hero image, with the search on top. The theme has multiple page templates; the homepage uses the template as below:
<?php
/**
* Template Name: Page: Home
*
* @package Listify
*/
if ( ! listify_has_integration( 'wp-job-manager' ) ) {
return locate_template( array( 'page.php' ), true );
}
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $style = get_post()->hero_style; ?>
<?php if ( 'none' !== $style ) : ?>
<?php if ( in_array( $style, array( 'image', 'video' ) ) ) : ?>
<div <?php echo apply_filters( 'listify_cover', 'homepage-cover page-cover entry-cover entry-cover--home entry-cover--' . get_theme_mod( 'home-hero-overlay-style', 'default' ), array( 'size' => 'full' ) ); ?>>
<div class="cover-wrapper container">
<?php
the_widget(
'Listify_Widget_Search_Listings',
apply_filters( 'listify_widget_search_listings_default', array(
'title' => get_the_title(),
'description' => strip_shortcodes( get_the_content() )
) ),
array(
'before_widget' => '<div class="listify_widget_search_listings">',
'after_widget' => '</div>',
'before_title' => '<div class="home-widget-section-title"><h1 class="home-widget-title">',
'after_title' => '</h1></div>',
'widget_id' => 'search-12391'
)
);
?>
</div>
<?php
if ( 'video' == $style ) :
wp_reset_query();
add_filter( 'wp_video_shortcode_library', '__return_false' );
the_content();
remove_filter( 'wp_video_shortcode_library', '__return_false' );
endif;
?>
</div>
<?php else : ?>
<div class="homepage-cover has-map">
<?php
do_action( 'listify_output_map' );
if ( ! is_active_widget( false, false, 'listify_widget_map_listings', true ) ) {
do_action( 'listify_output_results' );
}
?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'listify_page_before' ); ?>
<div class="container homepage-hero-style-<?php echo $style; ?>">
<?php if ( listify_has_integration( 'woocommerce' ) ) : ?>
<?php wc_print_notices(); ?>
<?php endif; ?>
<?php
if ( is_active_sidebar( 'widget-area-home' ) ) :
dynamic_sidebar( 'widget-area-home' );
else :
$defaults = array(
'before_widget' => '<aside class="home-widget">',
'after_widget' => '</aside>',
'before_title' => '<div class="home-widget-section-title"><h3 class="home-widget-title">',
'after_title' => '</h3></div>',
'widget_id' => ''
);
the_Widget(
'Listify_Widget_Recent_Listings',
array(
'title' => __( 'Recent Listings', 'listify' ),
'description' => __( 'Take a look at what\'s been recently added.', 'listify' ),
'limit' => 6,
'featured' => 0
),
$defaults
);
endif;
?>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>
There is a template provided which can be used to add a slider using a shortcode. The shortcode I am using is [rev_slider alias=”slider1″]. Check the page here http://www.edumuffin.com/test-page/
The template which this page uses is as below:
<?php
/**
* Template Name: Page: Home (Slider 2)
*
* @package Listify
*/
if ( ! listify_has_integration( 'wp-job-manager' ) ) {
return locate_template( array( 'page.php' ), true );
}
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php do_action( 'listify_page_before' ); ?>
<div class="container">
<?php if ( listify_has_integration( 'woocommerce' ) ) : ?>
<?php wc_print_notices(); ?>
<?php endif; ?>
<?php dynamic_sidebar( 'widget-area-page-' . get_the_ID() ); ?>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>
Though I can still add widgets to this page to have content as in my website homepage, but the search will still not appear.
I want to have the slider as it appears in test-page on my homepage, with the search intact on top of the slider.
Revolution slider provides the following code for embedding the slider:
From the theme html use: <?php putRevSlider( ‘slider1’ ); ?>
To add the slider only to homepage use: <?php putRevSlider(‘slider1’, ‘homepage’); ?>
To add the slider on specific pages or posts use: <?php putRevSlider(‘slider1’, ‘2,10’); ?>
Any help would be great.
Thanks.