badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Slider on every page and/or post

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #19175
    themehorse3
    Participant

    Hi All,

    Is it possible to have the slider on every page and/or post, not just the home page?

    Regards,
    Dennis

    #19224

    HI themehorse3,
    Sorry we don’t have this feature in our theme. It needs code customization. So you need to hire a developer to fix the issue.

    Thank you!

    #19438
    themehorse3
    Participant

    I have added

    echo '<!-- not home and show slider -->';
    
    if( function_exists( 'attitude_pass_cycle_parameters' ) ) 
     attitude_pass_cycle_parameters();
    if( function_exists( 'attitude_featured_post_slider' ) ) 
       attitude_featured_post_slider();
    

    to header-extensions.php after else { on line 281 before if( ( '' != attitude_header_title() ) || function_exists( 'bcn_display_list' ) ) { on line 282.

    Now it shows but the slider nav is not showing and slider stopped rotating.

    Does anyone please have any tips? I would really love to have a slider on all pages.

    Kind regards,
    Dennis

    #19439
    themehorse3
    Participant

    Got it: it needed some javascript. Changed

    if( ( is_home() || is_front_page() ) && "0" == $options[ 'disable_slider' ] ) {
    		wp_enqueue_script( 'attitude_slider', ATTITUDE_JS_URL . '/attitude-slider-setting.js', array( 'jquery_cycle' ), false, true );
    	}

    in functions.php on line 48-50

    to

    	//if( ( is_home() || is_front_page() ) && "0" == $options[ 'disable_slider' ] ) {
    		wp_enqueue_script( 'attitude_slider', ATTITUDE_JS_URL . '/attitude-slider-setting.js', array( 'jquery_cycle' ), false, true );
    	//}
    

    Kind regards,
    Dennis

    #19481

    Ok that’s great themehorse3,

    We recommended not to change the code because if you change the code then while updating to our new version all your customisation code will be lost. So better make child theme and first unhook the functions and the edit the code.

    http://codex.wordpress.org/Child_Themes

    Thank you!

    #19488
    themehorse3
    Participant

    Thank you for your recommendation to use a child theme. I’ve been trying to make one, but have a question:

    How can you overwrite a parent theme function with a child function?

    I want to overwrite require_once( ATTITUDE_STRUCTURE_DIR . '/header-extensions.php' ); in the parent function attitude_load_files with require_once ( get_stylesheet_directory() . '/library/structure/header-extensions.php' );

    Regards,
    Dennis

    #19521

    Hi themehorse3,
    First of all create a child theme folder name attitude-child in the theme folder directory and then create two files style.css and functions.php and under style.css file add this code

    /*
     Theme Name:   Attitude Child
     Theme URI:    https://www.themehorse.com
     Description:  Attitude Child customization
     Author:       Theme Horse
     Author URI:   
     Template:     attitude
     Version:      1.0.0
     Tags:         
     Text Domain:  attitude
    */
    
    @import url("../attitude/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    [rest of custom style css]

    and under functions.php file first unhook the functions and then only customise the code.
    For example to unhook the functions and over ride the parent theme for page 404.php

    This is just an example, You need to customise the code in the same way for header-extension.php, if you are unable then you need to hire a developer to fix it.

    unhook functions
    
    // Unhook default Thematic functions
    function unhook_thematic_functions() {
        // Don't forget the position number if the original function has one
    
    remove_action( 'attitude_404_content', 'attitude_display_404_page_content', 10 );
    
    }
    add_action('init','unhook_thematic_functions'); // removes the header content by using hook attitude_header
    
    add_action( 'attitude_404_content', 'attitude_child_display_404_page_content', 10 );
    /**
     * function to show the footer info, copyright information
     */
     
     
    function attitude_child_display_404_page_content() {      ?>   
    <div id="content">
    		<header class="entry-header">
    			<h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 'attitude' ); ?></h1>
    		</header>
    		<div class="entry-content clearfix" >
    			<p>Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    }
    

    Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.