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 1 reply, has 2 voices.

Last updated by Amir 9 years, 5 months ago.

Author Posts
March 4, 2011 at 6:38 pm #22956


Is there a better way than this to get a specific post to display on my mostly static homepage?

	// TODO: Better way?
	(ICL_LANGUAGE_CODE == 'fr') ? $id = 154 : $id = 158;
	$text = get_post($id);


March 4, 2011 at 8:19 pm #22958


You can use the function


, it's intended exactly for this:

The topic ‘[Closed] Get a specific post, better way than this?’ is closed to new replies.