Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Dat Hoang 6 years, 2 months ago.

Assigned support staff: Dat Hoang.

Author Posts
August 17, 2014 at 12:31 am #453172


I am trying to: prevent human error

I visited this URL:

I expected to see:

Instead, I got:

August 17, 2014 at 12:35 am #453173


Sorry guys my message got cancelled by mistake

Client disabled wpml by mistake and all hell broke loose( e.g. yelling "My website disappeared!!!!")
I need to include some function only if WPML is installed and active. I am using:

if (class_exists('SitePress')) {
	// stuff goes here

is it correct?

Thanks in advance, and sorry for the empty message above...

August 18, 2014 at 6:46 am #453344

Dat Hoang

You can use:

if ( function_exists('icl_object_id') ) {

My recommendation comes from our official document here:

I think this link is useful for you as well:

The topic ‘[Closed] How to check if WPML is installed and active’ is closed to new replies.