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*

Bugs in Attitude Pro

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12314
    BlackWidow
    Participant

    Hi There
    I’ve been having problems with Attitude Pro on a client’s website. It is making the site load very slowly.

    My clients site is : http://www.findyourmusic.com.au

    I contacted the host to see if it was a server side issue and this is what they came back with in their troubleshooting:

    ————–
    Dear Customer,

    Thank you for your recent call.

    Our Tech Team have been able diagnose why your website is loading slowly.

    The site is loading slowly yes, however this is not server related.

    The following information you can pass onto your website designers: Black Widow Graphic Design. They can use this information to make your site more efficient.

    The website findyourmusic.com.au hangs at multiple locations:

    • index.php chooses theme “wp-content/themes/attitude-pro”
    • “wp-content/themes/attitude-pro/header.php” runs “‘do_action( ‘attitude_links’ )” (Line 41)
    • This runs portions of “wp-content/themes/attitude-pro/library/structure/header-extensions.php” (Anywhere “add_action( ‘attitude_links’ ….” is referenced.)
    • One of the added actions is a function “attitude_webpageicon”
    • This hangs on line 155: “set_transient( ‘attitude_webpageicon’, $attitude_webpageicon, 86940 );”

    There is also another reason for the delay: In initial loading at line 46 “wp_head();”. However we are not sure of the specifics. You will need to get your website designers to look into this.

    ————–
    Could you let me know how I can fix the above problems. I am not a programmer and would really appreciate help on this as it seems it is the theme that is at fault.

    Regards
    Black Widow

    #12381

    hi Black Window,
    We don’t have any issue. It your site is slow due to transient then you may change this code

    function attitude_webpageicon() {	
    	
    	$attitude_webpageicon = '';
    	if( ( !$attitude_webpageicon = get_transient( 'attitude_webpageicon' ) ) ) {
    		global $attitude_theme_options_settings;
          $options = $attitude_theme_options_settings;
    
    		if ( "0" == $options[ 'disable_webpageicon' ] ) {
    			if ( !empty( $options[ 'webpageicon' ] ) ) {
    				$attitude_webpageicon .= '<link rel="apple-touch-icon-precomposed" href="'.esc_url( $options[ 'webpageicon' ] ).'" />';
    			}
    		}
    		
    	set_transient( 'attitude_webpageicon', $attitude_webpageicon, 86940 );	
    	}	
    	echo $attitude_webpageicon ;	
    }

    To

    function attitude_webpageicon() {	
    	
    	$attitude_webpageicon = '';
    		global $attitude_theme_options_settings;
          $options = $attitude_theme_options_settings;
    
    		if ( "0" == $options[ 'disable_webpageicon' ] ) {
    			if ( !empty( $options[ 'webpageicon' ] ) ) {
    				$attitude_webpageicon .= '<link rel="apple-touch-icon-precomposed" href="'.esc_url( $options[ 'webpageicon' ] ).'" />';
    			}
    		}
    	}	
    	echo $attitude_webpageicon ;	
    }

    and go to the theme folder (attitude – pro)-> library -> admin -> theme-options on line no 1919 and remove this code.
    delete_transient( 'attitude_webpageicon' );

    We recommended not to change the code because if you change the code then while updating to our new version all your customization 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
    Hope this may help for you.

    Thank you!

    #12417
    BlackWidow
    Participant

    Hi There
    thankyou for this.

    So where do I change the first lot of code? Do I place that code in the chile theme and that will override the old code?

    Thankyou
    Black Widow

    #12436

    If you create the child theme then you will not lost any data while updating to our new version but if you change code on parent file then all you customization code will be lost. So better create child theme and first unhook them functions and then only edit the code.
    Thank you!

    #12615
    BlackWidow
    Participant

    Hi there
    My site is still taking a long time to load and I think it is because the theme. When I switch to another theme, it loaddss quickly. I know you recommend to build a child theme but in which file do I find the following code:

    function attitude_webpageicon() {

    $attitude_webpageicon = ”;
    if( ( !$attitude_webpageicon = get_transient( ‘attitude_webpageicon’ ) ) ) {
    global $attitude_theme_options_settings;
    $options = $attitude_theme_options_settings;

    if ( “0” == $options[ ‘disable_webpageicon’ ] ) {
    if ( !empty( $options[ ‘webpageicon’ ] ) ) {
    $attitude_webpageicon .= ‘<link rel=”apple-touch-icon-precomposed” href=”‘.esc_url( $options[ ‘webpageicon’ ] ).'” />’;
    }
    }

    set_transient( ‘attitude_webpageicon’, $attitude_webpageicon, 86940 );
    }
    echo $attitude_webpageicon ;
    }
    Thanks
    Black Widow

    #12711

    hi
    this function is inside this file
    wp-content/themes/attitude-pro/library/structure/header-extensions.php

    and you need to create the child theme. just create the functions.php file inside child theme folder. Then first unhook the function and then customize your code.
    Thank you!

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