GeoDirectory Supportcustom field to be used as meta description – GeoDirectory Support https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/feed Mon, 16 Feb 2026 06:06:51 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437532 <![CDATA[custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437532 Mon, 09 Jul 2018 11:11:02 +0000 Steffen Hello,
I asked following request as a presales question to Paolo:
“Is it possible to define a custom field, which can be filled by the user as Metadescription?”

His Answer was: yes, It is possible to define a custom field to be used as meta description, however you’ll need a code snippet for your theme.

If you ask for it in our forum, our development team would be more than happy to assist you with this.

Can you please assist me with this.

Thanks and regads,
Steffen

]]>
https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437542 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437542 Mon, 09 Jul 2018 11:39:11 +0000 Alex Rollin https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437664 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437664 Tue, 10 Jul 2018 06:27:15 +0000 Steffen https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437759 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437759 Tue, 10 Jul 2018 12:32:07 +0000 Stiofan O'Connor Hi Steffan,

Have you already setup the field? If so if you provide wp-admin i will set it up for you 🙂

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437847 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437847 Wed, 11 Jul 2018 06:20:00 +0000 Steffen https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437894 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-437894 Wed, 11 Jul 2018 10:55:11 +0000 Stiofan O'Connor What field do u want to use?

This is an example of how to do it: https://wpgeodirectory.com/support/topic/meta-title-tages/#post-369400

Stiofan

]]>
https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-438011 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-438011 Wed, 11 Jul 2018 16:40:10 +0000 Steffen Hi Stiofan,
I want to give the users a field where they can add a custom meta description. I think best would be a text area field without editor. The content should be used as meta description for the search engines.

Thanks and regards,
Steffen

]]>
https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-438024 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-438024 Wed, 11 Jul 2018 17:10:25 +0000 Stiofan O'Connor Its setup now 🙂

For future reference this is the code:


add_filter( 'geodir_filter_title_variables_vars', '_my_custom_meta_description_seo_vars',10,4);

function _my_custom_meta_description_seo_vars( $title, $location_array, $gd_page, $sep ){
	global $post;

	if ( strpos( $title, '%%custom_meta_desc%%' ) !== false && !empty($post->geodir_meta_desc) ) {
		
		$title = str_replace( "%%custom_meta_desc%%", $post->geodir_meta_desc, $title );
	}

	return $title;
}

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-438026 <![CDATA[Reply To: custom field to be used as meta description]]> https://wpgeodirectory.com/support/topic/custom-field-to-be-used-as-meta-description/#post-438026 Wed, 11 Jul 2018 17:19:14 +0000 Steffen Great! Thank you very much!

]]>