Posts Tagged ‘tips & tricks’

Conditional bbPress 2.3 styles and scripts

Written by Alexis Nominé on . Posted in WordPress

bbPress is one of the best forum plugins available for WordPress. However, one shortcoming of the current version (2.3) is that styles and scripts are loaded on every WordPress page even if not needed. This is not a best practice in for your website performance. Here is a quick fix for that:

In a plugin or in the functions.php file of your theme, just add:

// clean bbpress stuff outside of bbpress
add_action( 'wp_head', 'conditional_bbpress_head', 9 );
function conditional_bbpress_head(){
	if( !is_bbpress() )
		remove_action( 'wp_head', 'bbp_head' );
}
add_action( 'wp_enqueue_scripts', 'conditional_bbpress_scripts', 9 );
function conditional_bbpress_scripts(){
	if( !is_bbpress() )
		remove_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts' );
}

Now, the head should be cleaner on every other part of your site, and the loading time greatly improved.

Multilingual Press (free) : add custom post type support

Written by Alexis Nominé on . Posted in WordPress

17/04/2012: Updated for Multilingual Press 1.0.3

Multilingual Press plugin allows to have a multilingual WordPress, using a multisite installation. It does his job very well except it works only with posts and pages for the free version. If you want to enable it on your custom post types, you can either buy the pro version or follow two simple steps, after the break. Continue Reading

Joomla 1.0.15 & PHP 5.3+ quick fix

Written by Alexis Nominé on . Posted in Joomla

My host has decided to take the move to php 5.3. It causes a "little" problem with the websites powered by Joomla 1.0: content disappears everywhere! Here is a simple solution to fix it:

Open /includes/Cache/Lite/Function.php and replace at line 74:

$arguments = func_get_args();

with:

$arguments = func_get_args();
$numargs = func_num_args();
for($i=1; $i < $numargs; $i++){
     $arguments[$i] = &$arguments[$i];
}