Blog Directory plugin - can 'blogs' title and slug be changed?

I want to use the Blogs Directory plugin, but I want to have a page title and slug different from the auto-created 'blogs'. Is it possible to do this and not mess up the functioning of the plugin?

  • DavidM
    • DEV MAN’s Mascot

    Hello guildmeister,

    Welcome to WPMU DEV! Apologies for the delayed response on this one!

    I believe the following from line 34 of the blogs-directory.php file provides the solution:
    $blogs_directory_base = 'blogs'; //domain.tld/BASE/ Ex: domain.tld/user/

    It would seem the plugin has been designed with that possibility in mind, as you should be able to simply replace 'blogs' with whatever slug you'd like and the plugin will take care of the rest.

    You can achieve this rather directly from your WordPress admin area by simply navigating to Plugins > Plugins, finding Blogs Directory in your plugins list, selecting to Edit the plugin and making your change in the built-in editor.

    You'll find that line just a short way down in the editor, just be sure to press the Update File button once you're done!

    Hope that helps!

    Cheers,
    David

  • Bluesplinter
    • New Recruit

    I just installed this plugin and noticed the same issue. I implemented David's suggestion, which works for the slug, but other folks with the same requirements should be aware that there are several areas throughout the plugin's code where the html text "Blog" is hardcoded. For a quickie, I went through and changed those, but long term I might suggest also making that label a variable.

    I probably will do that to my own copy, though that means branching from the official version (sigh). :slight_smile:

    Anyway, my $.02
    Steve

  • coburnenterprises
    • Site Builder, Child of Zeus

    Hey all... I found the line of code, [$blogs_directory_base = 'blogs'; //domain.tld/BASE/ Ex: domain.tld/user/] changed 'blogs' to 'sites' [$blogs_directory_base = 'sites'; //domain.tld/BASE/ Ex: domain.tld/user/] and my search box and list of sites disappear... any ideas?

  • Jason
    • The Incredible Code Injector

    For a total of 4 cents, here's MY 2 cents.

    It should be an option to set this somewhere, so we don't break our site in the future by updating the plugin... :disappointed: I hope I never have to update it now...

  • wooster
    • Design Lord, Child of Thor

    Just wondering why we don't change $blogs_directory_base = 'blogs'; to
    $blogs_directory_base = strtolower(get_site_option('blogs_directory_title_blogs_page', 'Blogs')); Just looking for some way to be able to change the slug without having to edit the plugin.

  • Mason
    • DEV MAN’s Sidekick

    Yeah, let's make this one a proper feature request. I think making it an editable option in the admin is a good idea. I'll mention this to the developer. He's got a lot on his plate, but we'll see what he says about adding this to the list.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.