• Resolved kamoe

    (@kamoe)


    Hi and thanks for a great plugin, I’m setting it up now, so far so good.

    Is there a method to change the URL part where the “/advert/” appear? I would like to change it for language and SEO reasons.

    Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter kamoe

    (@kamoe)

    There is the same issue related to “Category” links.. they point to “/advert-category/..”. Again I need to translate it etc.

    Thread Starter kamoe

    (@kamoe)

    Possibly I found the solution.. can you confirm this is the only way?

    https://www.ads-software.com/support/topic/change-slug-from-adverts/

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, yes, right now the method explained in the thread you linked to is the best way to change the links in WPAdverts.

    Thread Starter kamoe

    (@kamoe)

    Great! Got it working now… just a tip for other users. When you do these changes. WP Supercache plugin can trick you into not seeing changes made. And also try to disable/enable the WP Adverts plugin if you don’t see the changes to the URL’s. It should fix the problem.

    Thread Starter kamoe

    (@kamoe)

    After installing the “Maps and Locations” plugin there is another URL that needs to be translated/SEO-friendly /advert-location. This is not handled by the custom-slugs code example that this thread link to.

    How can this be fixed?

    K

    Plugin Author Greg Winiarski

    (@gwin)

    In your theme functions.php file add

    
    add_filter( "wpadverts_mal_register_taxonomy", "my_wpadverts_mal_register_taxonomy", 10, 2 );
    function my_wpadverts_mal_register_taxonomy( $args, $type = null ) {
        if( $type != "advert_location" ) {
            return $args;
        }
        
        if(!isset($args["rewrite"])) {
            $args["rewrite"] = array();
        }
       
        $args["rewrite"]["slug"] = "ad-location";
        return $args;
    }
    
    Thread Starter kamoe

    (@kamoe)

    Thanks again, that worked like a charm. But ideally I could add this to the code that changes the URL of the other “static” url’s from this plugin.. now I have it as a plugin as described in: https://github.com/simpliko/wpadverts-snippets

    Plugin Author Greg Winiarski

    (@gwin)

    The theme functions.php file is one place you can put it, but if you have some separate plugin with WPAdverts snippets you can paste this code there, it will work and will not be overwritten on theme update.

    Hi Greg, WPadverts plugin is awesome & very usefull plugin. But i have two problems that 1). whenever i created a classified category, URL of that category will be like this “www.example.com/adverts-category/post-name”. i dont want that ‘adverts-category’ in url.
    2). whenever i add a ad in classifieds, URL of that ad will be like this “www.example.com/advert/ad-name”. but i dont want that ‘advert’ in url.
    because i need SEO friendly url.so what is the solution ?…
    thanks in advance

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1. what you would like the category URL to look like, just www.example.com/post-name/ if so then i would highly recommend not to do this.

    Your category names will then conflict with page or post names and will not point to correct URLs, it is best to have some prefix even if it would be just “c” like www.example.com/c/post-name.

    2. similarly as with #1 having such URL will (sooner or later) cause a conflict in WordPress router and it is best to have some kind of prefix.

    Also, note that the default URLs are SEO friendly and in fact are a better solution than not having prefixes at all as the prefixes add some kind of hierarchical structure to your site which Google can understand and better index your site.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘SEO Friendly URL’ is closed to new replies.