- This topic has 5 replies, 2 voices, and was last updated 10 years, 3 months ago by Theme Horse Support Team.
-
AuthorPosts
-
July 21, 2014 at 8:46 am #12314BlackWidowParticipant
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 WidowJuly 23, 2014 at 6:03 am #12381Theme Horse Support TeamKeymasterhi Black Window,
We don’t have any issue. It your site is slow due to transient then you may change this codefunction 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!
July 24, 2014 at 2:34 am #12417BlackWidowParticipantHi 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 WidowJuly 24, 2014 at 11:14 am #12436Theme Horse Support TeamKeymasterIf 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!July 31, 2014 at 6:28 am #12615BlackWidowParticipantHi 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 WidowAugust 4, 2014 at 1:13 pm #12711Theme Horse Support TeamKeymasterhi
this function is inside this file
wp-content/themes/attitude-pro/library/structure/header-extensions.phpand 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! -
AuthorPosts
- You must be logged in to reply to this topic.