Edit locality content | WordPress.org

[ad_1]

Plugin Author
Steven

(@shazahm1hotmailcom)

The “locality” is a filter applied to the page in which your directory is embedded. It is not possible to edit the filtered directory listings.

If you want strong rankings, it is best to ensure current quality, unique content for each business listing. You can accomplish this by leveraging the entry’s bio and excerpt fields.

It is possible to dynamically insert content by leveraging the [cn-content] shortcode. Here’s the link to the docs:

There is no condition for “locality,” but it is possible to add one. The following code should add it:

add_filter(
	'Connections_Directory/Shortcode/Conditional_Content/is_condition/is_locality',
	static function( $condition, $parameter, $shortcode ) {
		
		$queryValue = cnQuery::getVar( 'cn-locality', false );
		
		if ( ! is_null( $parameter ) && $queryValue ) {
			
			if ( $queryValue === $parameter ) {

				$condition = true;
			}
		}
		
		return $condition;
	},
	10,
	3
);

You can add this code to your site using the Code Snippets plugin:

I hope this helps; please let me know.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer