₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,524 members, 8,445,835 topics. Date: Wednesday, 15 July 2026 at 04:19 PM

Toggle theme

Expert Wordpress Coders Pls Your Advice Needed - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersExpert Wordpress Coders Pls Your Advice Needed (973 Views)

1 Reply (Go Down)

Expert Wordpress Coders Pls Your Advice Needed by Nobody: 12:16pm On Feb 04, 2019
Hello webmasters I need some help.

I need to paste 2 code snippets into my theme to deregister CSS and speed it up. Its the latest version on newspaper theme V9.2.2 and though its somewhat faster than other versions, there is the possibility to speed it up even better. Got the codes from the officel newspaper forum but the wahala is how to implement it.

Everyone want to be paid to fix it for me but i wanna fix it for me. I don't want to use a plugin to do it either since i am not new to codes and already have too many plugins in there for my liking. I can code blogger and only moved to WP lately. Still in learning mode.

The fist code goes in my theme's Functions php while the second goes in the child theme functions php.

This is what my Theme's functions PHP looks like towards the bottom where the code is to go.

}, 3000);

</script>
<?php

echo ob_get_clean();
}
}


Code to be added.


//Remove Multi Purpose Style
add_action( 'wp_enqueue_scripts', 'infophilic_remove_multi_purpose', 20 );
function infophilic_remove_multi_purpose() {
wp_dequeue_style( 'td-plugin-multi-purpose' );
}


Question: Where exactly should i insert the code? The presence of the element in the file <?php is what confused me. cos its a closing for sure. I dont know whether to enter my code before or after it or just at the bottom of the php file.

Pls advice.




I believe the lesson i learn here will help me insert the second code into the child theme Funtions php which ends with just one .} instead of two.

wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', TD_THEME_VERSION, 'all' );
wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), TD_THEME_VERSION . 'c', 'all' );

}
Re: Expert Wordpress Coders Pls Your Advice Needed by etoluw:
add it to the top just after "<?php" opening tag
Re: Expert Wordpress Coders Pls Your Advice Needed by Nobody: 1:36pm On Feb 04, 2019
etoluw:
add it to the top just after "<?php" opening tag
Thank you so much bro. But now i have to ask one last question cos your answer has set it up.


How about this code...

// Remove WP embed script
function infophilic_stop_loading_wp_embed() {
if (!is_admin()) {
wp_deregister_script('wp-embed');
}
}
add_action('init', 'infophilic_stop_loading_wp_embed');



According to instructions it has to go directly to the end of my Functions php file and of all the 3 codes it is the most important, the only one that contains that double } element that appears at the end of the functions PHP file.

I just figured i would paste the code right there at the end of the functions php file that is why i did not ask about it.



Bottom of Funtions PHPP file

}, 3000);

</script>
<?php

echo ob_get_clean();
}
}
(wanted to paste it here)


.
Re: Expert Wordpress Coders Pls Your Advice Needed by godwinstringed1(m): 2:44pm On Feb 04, 2019
Dannybrain
Whats the name of your website
Re: Expert Wordpress Coders Pls Your Advice Needed by Nobody:
godwinstringed1:
Whats the name of your website
Still work in progress but will be done this month
Re: Expert Wordpress Coders Pls Your Advice Needed by etoluw: 7:13pm On Feb 04, 2019
Dannybrain:
Thank you so much bro. But now i have to ask one last question cos your answer has set it up.


How about this code...

// Remove WP embed script
function infophilic_stop_loading_wp_embed() {
if (!is_admin()) {
wp_deregister_script('wp-embed');
}
}
add_action('init', 'infophilic_stop_loading_wp_embed');



According to instructions it has to go directly to the end of my Functions php file and of all the 3 codes it is the most important, the only one that contains that double } element that appears at the end of the functions PHP file.

I just figured i would paste the code right there at the end of the functions php file that is why i did not ask about it.



Bottom of Funtions PHPP file

}, 3000);

</script>
<?php

echo ob_get_clean();
}
}
(wanted to paste it here)


.
d truth is you can add those codes anywhere just make sure you are not putting it inside another function

i told to add it just after the opening php tag because that is the easiest place to put it .
Re: Expert Wordpress Coders Pls Your Advice Needed by Nobody: 8:27pm On Feb 04, 2019
etoluw:
d truth is you can add those codes anywhere just make sure you are not putting it inside another function

i told to add it just after the opening php tag because that is the easiest place to put it .
Now i understand. WordPress is really cool. With blogger no be so. You myst find that line of code aft the comma or full stop and paste the snippet there or you are in trouble

Thank you.
Re: Expert Wordpress Coders Pls Your Advice Needed by Nobody: 8:29pm On Feb 04, 2019
godwinstringed1:
Whats the name of your website
Awaiting your feedback on how you see the site
1 Reply

Gold Coders Hyip Manager Pro 2019 For Sale At Cheaper RateNairalander!!! Pls Your Support Is Needed!!!Pls Your Opinion Is Needed Here234

More Than 4 Yrs Old Facebook page Up For Sale VERY AFFORDABLEHow To Track, Analyse And Optimize Website Performance Using Google AnalyticsWhat???