• Resolved jonwatson87

    (@jonwatson87)


    Just what I’ve been looking for!

    I’ve tried about half a dozen other plugins in my search for this functionality and none have worked the way I needed them to (if they worked at all).

    That said, I do think a couple of tweaks are needed, to make it perfect for my needs:

    1. I need to the permalink to update when you change the primary. At the moment if it’s set to “News” and I change it to “Comment” the permalink keeps the old “News” slug (not ideal)
    2. Is it possible to disable the ability to edit the slug from the post edit screen, and have it change automatically depending on the primary taxonomy selected? I have several users who habitually select EVERYTHING in the permalink box and write over the top of it. It’d be great if you could set it so the slug wasn’t part of the editable text on this screen

    Hope that all makes sense. Can’t wait for the new and improved version! Any ideas when 1.1, or the pro version will be released?

    • This topic was modified 7 years, 9 months ago by jonwatson87. Reason: clarification of bullet point
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @jonwatson87

    both the features are almost completed and will be available in free version of the plugin. I think that 1.1 version will be released next week, after I complete some additional tests.

    The “edit URI” box on single post/page admin pages is completely changed (now it will be displayed only after “Permalink Manager” button is clicked) to improve UX.

    Below the “edit URI” box there will be a checkbox that would allow to automatically update the custom URI or manually reset it.

    Initial state.

    Box active.

    Best Regards,
    Maciej

    Thread Starter jonwatson87

    (@jonwatson87)

    Awesome! Can’t wait! ??

    Regarding the checkbox, is there any way of setting that option globally? Or setting it globally but allowing people to change the setting for individual posts?

    For me, allowing ALL URIs to automatically update according to the current primary taxonomy is going to be the default behaviour.

    That way when someone changes the primary taxonomy of a post the permalink will change without them having to go in and tick the box.

    Just one less thing for clients to worry about sorting, to make their life as easy as possible. If they change the taxonomy I think most will expect the permalink to change automagically.

    Plugin Author Maciej Bis

    (@mbis)

    Yes, it will be possible to select the global setting for automatic URI updates – the checkbox will be replaced with the dropdown (“use global settings”, “automatically update the URI”, “do not update the URI automatically”) + a new global setting field will be added.

    Plugin Author Maciej Bis

    (@mbis)

    Hi @jonwatson87

    the 1.1.0 version is ready – I would be grateful if you could download it from repository:
    https://downloads.www.ads-software.com/plugin/permalink-manager.1.1.0.zip

    and test it (you will need to remove old instance of plugin & install the new one manually).

    You can preselect the “Auto-update” setting here:
    Auto-update global setting

    and overwrite the setting for each post:

    Thank you!

    Thread Starter jonwatson87

    (@jonwatson87)

    Awesome! ??

    Just one small bug that I can see.

    If you’ve got two categories selected (with one assigned as primary via Yoast) it doesn’t actually update the first time around.

    You actually have to click update twice to get the permalink to change.

    Other than that, it’s perfect! ?? JUST what I needed.

    Plugin Author Maciej Bis

    (@mbis)

    Sorrry, I missed it – the custom URI is obtained from databse before Yoast updates the primary term.

    This can be easily fixed, please open:
    wp-content/plugins/permalink-manager-pro/includes/core/permalink-manager-uri-functions-post.php

    find line #17:
    add_action( 'save_post', array($this, 'update_post_uri'), 10, 3 );

    and replace it with this:
    add_action( 'save_post', array($this, 'update_post_uri'), 999, 3 );

    Best Regards,
    Maciej

    Thread Starter jonwatson87

    (@jonwatson87)

    PERFECT! ??

    You’re a star!

    Thread Starter jonwatson87

    (@jonwatson87)

    Having said that, I am getting one weird conflict error:

    When your plugin is activated I get this error:

    Undefined property: stdClass::$post_type in /nas/content/live/p365/wp-content/plugins/give-recurring/includes/give-recurring-scripts.php on line 152

    pop up on my events post edit screen.

    No idea why…

    The line in the file listed is simply:

    if ( ‘give_forms’ !== $post->post_type ) {
    return;
    }

    Any ideas?

    Plugin Author Maciej Bis

    (@mbis)

    This version of plugin is enabled in “safe-mode”, please remove the first three lines from permalink-manager.php in main directory to hide the errors & notices from another plugins.

    Thread Starter jonwatson87

    (@jonwatson87)

    Aha! So it is! Perfect ?? Thanks for that!

    Thread Starter jonwatson87

    (@jonwatson87)

    Okay. One more slight issue.

    The native slug seems to be generated prior to the permalink.

    As such, if you have two posts in separate categories, but named the same, you get that annoying -2 on the end of your link and have to change it manually in permalink manager.

    I’ve got several donation/sponsorship forms that relate to specific events, and I define which event it relates to by giving it an event category.

    To sponsor a centrepiece for table one at the Sydney event, for instance, I have this permalink:

    /support/sydney-gala-2017/table-1

    But if I now go to add another table-1, for a different event, it thinks I’m creating two table-1s (based on the native slug alone). The category isn’t taken into account prior to saving, which means my new permalink (on save) becomes:

    /support/melbourne-gala-2017/table-1-2

    Is there any way to avoid this behaviour, other than naming all the posts differently or changing it manually after the fact?

    • This reply was modified 7 years, 9 months ago by jonwatson87.
    • This reply was modified 7 years, 9 months ago by jonwatson87. Reason: Clarification
    Plugin Author Maciej Bis

    (@mbis)

    In final 1.10.0 release there will be an option to bypass wp_unique_post_slug() function and regenerate the slugs in default URIs from the post titles.

    Temporarily you can use this hook:

    function force_custom_slugs($slug, $object, $name) {
    		$old_slug = basename($slug);
    		$new_slug = sanitize_title($object->post_title);
    
    		return ($old_slug != $new_slug) ? str_replace($old_slug, $new_slug, $slug) : $slug;
    }
    add_filter( 'permalink_manager_filter_default_post_slug', 'force_custom_slugs', 5, 3 );
    • This reply was modified 7 years, 9 months ago by Maciej Bis.
    Thread Starter jonwatson87

    (@jonwatson87)

    Awesome! ??

    You’re a legend!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Feature Requests (willing to pay for Pro version right now!)’ is closed to new replies.