How do I change the URL for plugins

I would like to be able to change the URL to some of my plugins. For SEO reasons and also for increasing the readability I would like to use swedish words on my swedish site in my URLs.

However I can´t seem to figure out how to do this with the below plugins:
Global Site Search
Global Site Tags
Blogs Directory

These plugins have one page each with the below URLs that I would like to change:

mydomain/blogs
mydomain/tags
mydomain/site-search

Any suggestions?

Br
Robin

  • skursvamp

    Hi!

    I´m not sure this is going to help me. I don´t do a multilingual site. My site is purely in Swedish, and If I wanted to I could just change the URL for the tags-page into:

    mydomain/swedish-word-for-tags

    But if I changed it like that, the tags page would not act like a tags page anymore. I think it is depending on having the exact page slug "tags". Isn´t that how it works?

    If I translated it into the above URL with WPML, wouldn´t I have the same problem?

    I want some workaround on how to make the tags-page act like the tags-page (showing the tag-cloud) without needing the page slug to be "tags".

    Br
    Robin

  • skursvamp

    I translated the language-files, but that didn´t affect the slug.
    I tried to rename the slug, but then, not surprisingly, the page didn´t understand that it should do anything special, and just showed an empty page.

    Finally I found this code in the top of the Blogs Directory code file:

    if (defined('BLOGS_DIRECTORY_SLUG')) {
    $blogs_directory_base = BLOGS_DIRECTORY_SLUG;
    } else {
    $blogs_directory_base = 'blogs'; //domain.tld/BASE/ Ex: domain.tld/user/
    }

    This looked perfect to me and thought that I could just add a constant to wp-config, so I tried that:

    define('BLOGS_DIRECTORY_SLUG', "bloggar");

    I also renamed the slug of the blogs-page to the swedish word "bloggar".

    However, now the page is acting really strange. All my pages just show an archive page. The slugs are showing the correct page-slugs, but the pages just aren´t showing. Instead an article page showing a list of all my articles is showing. Also I get alot of .404 errors for my images.

    http://blogg123.se

    I removed that constant definition from wp-config, but still nothing works. And the original problem with the blogs-page still remains. :slight_frown:

    My subdomain-sites in the network wasn´t affected by this and are still working.

    Any ideas?

    Br
    Robin

  • skursvamp

    Really strange. Suddenly it started working again. I think it was after disabling and enabling the plugin. The plugin must have triggered some kind of rewrite?

    Now I tried to edit the else-statement instead of adding a constant, and it works perfectly.

    For site-search the solution was to edit this row:

    var $global_site_search_base = 'site-search'; //domain.tld/BASE/ Ex: domain.tld/user/

    And further down also the middle row here:

    "post_date_gmt" => current_time( 'mysql' ),
    "post_content" => '',
    "post_title" => __('Nyckelord', 'globalsitetags'),
    "post_excerpt" => '',
    "post_status" => 'publish',

    Finally, to make the site-search work I changed here:
    var $global_site_search_base = 'bloggsok'; //domain.tld/BASE/ Ex: domain.tld/user/

    And here:

    "post_date_gmt" => current_time( 'mysql' ),
    "post_content" => '',
    "post_title" => __('Bloggsök', 'globalsitesearch'),
    "post_excerpt" => '',
    "post_status" => 'publish',

    This still didn´t work right away. I updated my network and added and removed the pages "site-search" and "bloggsok" a few times. Suddenly "bloggsok" was working.

    I think the behaviour is a little bit strange when trying to do these things and I´m not sure it works like intended.

    +1 for adding one extra field in the plugin settings where you can change the slug for all the above mentioned plugins. That would be a huge help for all of us who doesn´t make pages in english.

    Br
    Robin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.