Disable mod_pagespeed for WordPress admin

Use this in your htacess file (or nginx equivalent)

ModPagespeedDisallow */wp-admin/*

 

Further reading: https://obviate.io/2013/03/06/wordpress-3-5-and-mod_pagespeed-does-not-play-well-together/


Override Visual Composer default element settings (example included)

Need to override a field of setting in the default Visual Composer element?

 

We needed to set the default image size ( vc_single_image ) from thumbnail to full.

Here's how:

 

add_action( 'vc_after_init', 'vc_after_init_actions' );
function vc_after_init_actions() {
	$shortcode_vc_single_image = WPBMap::getShortCode( 'vc_single_image' );

	foreach($shortcode_vc_gallery_tmp['params'] as $key => $param)
	{
		if( $param['param_name'] === 'img_size' )
		{
            		$shortcode_vc_single_image['params'][$key]['value'] = 'full';
		}
	}

	//VC doesn't like even the thought of you changing the shortcode base, and errors out, so we unset it.
	unset( $shortcode_vc_single_image['base'] );

	vc_map_update('vc_single_image', $shortcode_vc_single_image);
         
}

First of all we need to know the config content shortcode base name, in our case vc_single_image.

Then we need to update the params. In order to prevent this "error" (see below) we need to unset the 'base' item.

Wrong setting_name for shortcode:vc_single_image. Base can't be modified.

And you're done!

 

Further reading:

Changing settings of built-in Visual Composer elements

How-To: customize default elements in Visual Composer


Avada get generated sidebar in PHP template

use

generated_dynamic_sidebar( 'name' );

In your PHP template files

This sidebar is also known as Widget section

Found: https://theme-fusion.com/forums/topic/blog-sidebar-load-in-custom-php-file/


WordPress Composer multiple mu-plugins fix

Normally WP Plugins have this structure:

plugins/plugin-name1/some.php

plugins/plugin-name2/some.php

plugins/plugin-name3/some.php

 

However MU-plugins should have this structure

mu-plugins/plugin-name1.php

mu-plugins/plugin-name2.php

mu-plugins/plugin-name3.php

This is an issue when using composer, as composer is only capable of using (sub) folders. When set to mainlevel folders, composer will delete its contents for each new plugin, resulting in only the last plugin ( in this example plugin-name3 ) "standing"..

Read how to overcome this WordPress composer issue


Say yes to the WordPress!

Zeg ook JA tegen een van de mooiste websitepakketten ooit! Nu is HET moment om in te stappen.

Wij regelen alles van A-Z, van ontwerp tot sitehosting en van updates tot advies.
Leg vandaag nog geheel vrijblijvend uw idee bij ons neer, en we maken er werk van!


How to exclude password protected posts in WP_Query

if(!current_user_can('edit_pages')) {
	// Exclude all passwd protected posts for non-authorized level users
	$args['perm'] = 'readable';
	$args['has_password'] = false; // Make sure
}

Only the perm should suffice, but it does not work in all situations. To make sure we add the has_password argument.
This snippit will allow all logged in users who have capabilities to edit a page to see the title of a password protected post. All others (subscribers and non logged in users, will not se the title of the protected post at all).


De slechte kenmerken van een webhost, let op bij webhosting aanschaffen!

Soms is iets te mooi om waar te zijn of klinkt het gewoon goed. Maar vaak is het verkoop praat en is er dus een addertje onder het gras!

Let op bij deze kreten of eigenschappen: (more…)


Hoe het snelst een .com domein verhuizen

In tegenstelling tot een .nl domeinnaam is het verhuizen van een .com grote ellende. Het duurt lang (tot een week na aanvraag) en het gaat vaak mis waardoor je opnieuw kunt beginnen. (more…)


Genesis force layout of parent page

/** Genesis force layout of parent page
MijnPress.nl
 */
add_filter( 'genesis_pre_get_option_site_layout', 'mp_child_get_parent_layout' );
function mp_child_get_parent_layout( $opt ) {
	global $post;
	if ( is_page() && $post->post_parent > 0) {
		$opt_new = get_post_meta($post->post_parent, '_genesis_layout', true);
		if($opt_new) {
			$opt = $opt_new;
		}
	}
	return $opt;
}

Uitgaand netwerkverkeer geheel blokkeren en inzien

Heb je een slechte of geen internetverbinding? Of ben je bezorgd om "call home" verzoeken naar bijvoorbeeld WordPress.org ?

Kies van voor een van deze simpele oplossingen: (more…)


Samenwerken doen we graag!

We werken graag op freelance basis. Ook voor andere web-bureau's en ontwikkelaars.
En dat mag ook op whitelabel basis. Doen we niet moeilijk over.

Bekijk de informatie pagina.