WordPress.org

Ready to get started?Download WordPress

Forums

WP User Frontend
Edit the url / postname (11 posts)

  1. amax2222
    Member
    Posted 1 year ago #

    Nice plugin. How can I add the option so that the admin can also edit the postname (permalink) from the frontend? Also is there a way to specify the preferred postname/permalink at the time of adding a new post as you can do in the WordPress backend. Appreciate your assistance.

    http://wordpress.org/extend/plugins/wp-user-frontend/

  2. professor99
    Member
    Posted 1 year ago #

    This is also known as the "Slug" which is a screen option on WordPress backend.

    Intrigued why you need to edit this?

    Not an option in Frontend at the moment but wouldn't be hard to implement.

  3. amax2222
    Member
    Posted 1 year ago #

    Yes its true I need to give the user the option to customize the slug, if its not hard to do, any chance you have a code snippet or can point me in the right direction. Thanks

  4. professor99
    Member
    Posted 1 year ago #

    You will need to add the wp_insert_post parameter post_name to the $my_post array in the wpuf-add-post.php function submit_post() and add input fields to suit. You will also have to add this field to the wpuf-edit-post.php file as well. Use other input fields in these files as an example of what to do.

    Still curious on why your users need to do this.

  5. WPChina
    Member
    Posted 1 year ago #

    Related question: is there a way to use this without using the /%postname%/ in the permalink? We need to integrate this into a Chinese-language site, so using Chinese characters on the URL often creates problems. For this reason, %post_id% is better for use. Any thoughts on how to get that working?

  6. professor99
    Member
    Posted 1 year ago #

    You need to edit the file wpuf_add_post.php as mentioned above. Find the submit_post() function and add the following parameter 'post_name' (set appropriately) to the my_post array which is passed to the WordPress function wp_insert_post().

    Thanks for telling me why you needed it. amax2222 wanted to change the permalink too as you noticed above but failed to reply when I asked why.

  7. WPChina
    Member
    Posted 1 year ago #

    Ok that sounds good. Now that I realized you have a fork of the plugin I am slowly going though your excellent advice on other threads to try to put together some long-sought solutions we have desired :)

  8. professor99
    Member
    Posted 1 year ago #

    To WPChina,

    To save yourself some work you could also use the WordPress "Permalink Settings" option to set all permalinks to a default of your own choosing

    %home%/wp-admin/options-permalink.php

  9. WPChina
    Member
    Posted 1 year ago #

    Thank you for the tip. I worried altering it there would conflict something with WPUF either now or down road of development~ this is good news!

  10. professor99
    Member
    Posted 1 year ago #

    Hi WPChina.

    Have added the Slug field to the new development release 4.3.

  11. WPChina
    Member
    Posted 1 year ago #

    Cheers~

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic