Home Support General HivePress SEO slug change

SEO slug change

  • Author
    Posts
  • Aizen

    Hi iHor,

    I’ve changed the name and slug of the listing page in pages, but i notice the link still shows as url.com/LISTING/listing-name-slug

    I would like to change the emboldened part above from listing to whatever I would like or at least as the page indicates.

    Thanks,

    A

    Aizen

    Also – how to make uploaded images required? as I cannot see this option anywhere. Thanks

    ihor developer

    It’s possible to resolve both issues with a simple code snippet, I’ll post it on Monday (currently I’m on vacation and I don’t have access to my laptop).

    Aizen

    Thanks, I hope you enjoyed your vacation

    ihor developer

    1. Please add this code snippet to the child theme’s functions.php file and then refresh permalinks in Settings/Permalinks section:

    add_filter('hivepress/v1/post_types', function($args) {
        $args['listing']['rewrite']['slug']='custom-slug-here';
    
        return $args;
    });

    2. This code snippet should make the images field required:

    add_filter(
    	'hivepress/v1/models/listing',
    	function( $model ) {
    		$model['fields']['images']['required'] = true;
    
    		return $model;
    	}
    );
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.