Forums

How to reuse CORE functionality to create permalink from any string (3 posts)

  1. franto
    Member
    Posted 4 months ago #

    Hi,

    can someone please help me how can i reuse WP core functionality in plugin to create permalink from any string

    example

    String: This is My Custom String
    Permalink: this-is-my-custom-string

    thanks in advance

  2. apljdi
    Member
    Posted 4 months ago #

    echo sanitize_title_with_dashes('This is My Custom String');

  3. franto
    Member
    Posted 3 months ago #

    thank you apljdi, works perfectly :)

Reply

You must log in to post.

About this Topic

Tags