Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,157,928 members, 7,835,099 topics. Date: Tuesday, 21 May 2024 at 04:09 AM

Expert Wordpress Coders Pls Your Advice Needed - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Expert Wordpress Coders Pls Your Advice Needed (802 Views)

Nairalander!!! Pls Your Support Is Needed!!! / Pls Your Opinion Is Needed Here / In Need Of Programmers/coders $5 Per Hour (2) (3) (4)

(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: 12:27pm On Feb 04, 2019
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: 4:53pm On Feb 04, 2019
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)

How To Block Adsense Invalid Clicks / Get Your Dream Website/mobile App At Record Time / Top 5 Free Movie Download Sites to Download Full HD Movies 2022

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.