Community Forums › Forums › Archived Forums › General Discussion › How Can I add this Slider in home-page?
- This topic has 5 replies, 2 voices, and was last updated 9 years ago by josetxo.
-
AuthorPosts
-
April 10, 2015 at 9:19 am #147334josetxoMember
Hi mates,
I install the "MetaSlider pluguin", run very good with Genesis Frame and my theme : METRO PRO.
But I have a problem, I can add this widget in widget area "Home Top", but if I do, the10 last post are not displayed (they are automatically deleted, I dont know the reason).
The slider is displayed only in the area of the inputs, but keeping the right sidebar on your site.
I want to add the Slider before the latest posts and sidebar. Is this possible?
I want to display the slider centered in the box, and below it, the latest posts and the right sidebar.
How I can do? What should I edit?
You have a short code of the slider, is: [metaslider id=53]
My web for test is: legendweed.com
Pic where I want the slider:
April 10, 2015 at 9:33 am #147336Brad DaltonParticipantMore efficient to hook the slider in using the sliders function rather than a short code in a widget.
I recommend the Easing Slider plugin.
April 11, 2015 at 1:32 am #147457josetxoMemberThank you very much for your help. It has helped me a lot !! 🙂
April 11, 2015 at 2:36 am #147460josetxoMemberHi Again,
Sorry mate, I try all but no run.... I dont know how to change code, and my English is bad (translator use).
My Easing Slider is:
<?php if ( function_exists( 'easingslider' ) ) { easingslider( 4359 ); } ?>
or: [easingslider id="4359"]I want Slider only be displayed on the main page, below the menu.
But I dont know what code I need use to copy in front-page.php or where to put it.
Can you help me please?
My frot-page.php is:
<?php /** * This file adds the Home Page to the Metro Pro Child Theme. * * @author StudioPress * @package Metro Pro * @subpackage Customizations */ add_action( 'genesis_meta', 'metro_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function metro_home_genesis_meta() { if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-right' ) || is_active_sidebar( 'home-bottom' ) ) { // Force content-sidebar layout setting add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); // Add metro-pro-home body class add_filter( 'body_class', 'metro_body_class' ); function metro_body_class( $classes ) { $classes[] = 'metro-pro-home'; return $classes; } // Remove the default Genesis loop remove_action( 'genesis_loop', 'genesis_do_loop' ); // Add homepage widgets add_action( 'genesis_loop', 'metro_homepage_widgets' ); } } function metro_homepage_widgets() { genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area">', 'after' => '</div>', ) ); if ( is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-right' ) ) { echo '<div class="home-middle">'; genesis_widget_area( 'home-middle-left', array( 'before' => '<div class="home-middle-left widget-area">', 'after' => '</div>', ) ); genesis_widget_area( 'home-middle-right', array( 'before' => '<div class="home-middle-right widget-area">', 'after' => '</div>', ) ); echo '</div>'; } genesis_widget_area( 'home-bottom', array( 'before' => '<div class="home-bottom widget-area">', 'after' => '</div>', ) ); } genesis();
and my functions.php is:
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Set Localization (do not remove) load_child_theme_textdomain( 'metro', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'metro' ) ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Metro Pro Theme', 'metro' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/metro/' ); define( 'CHILD_THEME_VERSION', '2.0.1' ); //* Add HTML5 markup structure add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Enqueue Google fonts add_action( 'wp_enqueue_scripts', 'metro_google_fonts' ); function metro_google_fonts() { wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Oswald:400', array(), CHILD_THEME_VERSION ); } //* Enqueue Backstretch script and prepare images for loading add_action( 'wp_enqueue_scripts', 'metro_enqueue_scripts' ); function metro_enqueue_scripts() { //* Load scripts only if custom background is being used if ( ! get_background_image() ) return; wp_enqueue_script( 'metro-pro-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'metro-pro-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'metro-pro-backstretch' ), '1.0.0' ); wp_localize_script( 'metro-pro-backstretch-set', 'BackStretchImg', array( 'src' => str_replace( 'http:', '', get_background_image() ) ) ); } //* Add custom background callback for background color function metro_background_callback() { if ( ! get_background_color() ) return; printf( '<style>body { background-color: #%s; }</style>' . "\n", get_background_color() ); } //* Add new image sizes add_image_size( 'home-bottom', 150, 150, TRUE ); add_image_size( 'home-middle', 332, 190, TRUE ); add_image_size( 'home-top', 700, 400, TRUE ); //* Add support for custom background add_theme_support( 'custom-background', array( 'wp-head-callback' => 'metro_background_callback' ) ); //* Add support for custom header add_theme_support( 'custom-header', array( 'width' => 270, 'height' => 80, 'header-selector' => '.site-title a', 'header-text' => false ) ); //* Add support for additional color style options add_theme_support( 'genesis-style-selector', array( 'metro-pro-blue' => __( 'Blue', 'metro' ), 'metro-pro-green' => __( 'Green', 'metro' ), 'metro-pro-pink' => __( 'Pink', 'metro' ), 'metro-pro-red' => __( 'Red', 'metro' ), ) ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Reposition the secondary navigation remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before', 'genesis_do_subnav' ); //* Hooks after-entry widget area to single posts add_action( 'genesis_entry_footer', 'metro_after_post' ); function metro_after_post() { if ( ! is_singular( 'post' ) ) return; genesis_widget_area( 'after-entry', array( 'before' => '<div class="after-entry widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); } //* Remove comment form allowed tags add_filter( 'comment_form_defaults', 'metro_remove_comment_form_allowed_tags' ); function metro_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } //* Reposition the footer widgets remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); add_action( 'genesis_after', 'genesis_footer_widget_areas' ); //* Reposition the footer remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); add_action( 'genesis_after', 'genesis_footer_markup_open', 11 ); add_action( 'genesis_after', 'genesis_do_footer', 12 ); add_action( 'genesis_after', 'genesis_footer_markup_close', 13 ); //* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'metro' ), 'description' => __( 'This is the top section of the homepage.', 'metro' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-left', 'name' => __( 'Home - Middle Left', 'metro' ), 'description' => __( 'This is the middle left section of the homepage.', 'metro' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-right', 'name' => __( 'Home - Middle Right', 'metro' ), 'description' => __( 'This is the middle right section of the homepage.', 'metro' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'metro' ), 'description' => __( 'This is the bottom section of the homepage.', 'metro' ), ) ); genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'metro' ), 'description' => __( 'This is the after entry section.', 'metro' ), ) );
April 11, 2015 at 2:57 am #147461Brad DaltonParticipantApril 11, 2015 at 3:08 am #147462josetxoMemberThanks, I created a consultation in forum Slider.
But ... I would like to have help here too, I paid for a theme and I think some serious support excellent.
Can you tell me please, How I can make an official inquiry to the creators of the theme?
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.