- This topic has 6 replies, 2 voices, and was last updated 9 years, 11 months ago by Theme Horse Support Team.
-
AuthorPosts
-
December 8, 2014 at 1:40 pm #19175themehorse3Participant
Hi All,
Is it possible to have the slider on every page and/or post, not just the home page?
Regards,
DennisDecember 9, 2014 at 1:44 pm #19224Theme Horse Support TeamKeymasterHI 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!
December 16, 2014 at 8:42 am #19438themehorse3ParticipantI 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 beforeif( ( '' != 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,
DennisDecember 16, 2014 at 9:06 am #19439themehorse3ParticipantGot 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,
DennisDecember 17, 2014 at 6:08 am #19481Theme Horse Support TeamKeymasterOk 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!
December 17, 2014 at 10:49 am #19488themehorse3ParticipantThank 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 withrequire_once ( get_stylesheet_directory() . '/library/structure/header-extensions.php' );
Regards,
DennisDecember 18, 2014 at 10:22 am #19521Theme Horse Support TeamKeymasterHi 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.phpThis 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!
-
AuthorPosts
- You must be logged in to reply to this topic.