• Resolved karelgeenen

    (@karelgeenen)


    Hello. Is it possible to add content to this page? I want to create strong city pages so they can rank in Google. But I have to be able to add content to it.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Edit locality content’ is closed to new replies.