WordPress.org

Forums

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

  1. franto
    Member
    Posted 5 years 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. s_ha_dum
    Member
    Posted 5 years ago #

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

  3. franto
    Member
    Posted 5 years ago #

    thank you apljdi, works perfectly :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags