WordPress.org

Ready to get started?Download WordPress

Forums

More Types
Enhance has_archive to accept string for permalink (2 posts)

  1. idealien
    Member
    Posted 2 years ago #

    From http://codex.wordpress.org/Function_Reference/register_post_type#Arguments : the has_archive parameter can be (boolean or string) and "Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.

    Currently More Post Type only can set yes / no value.

    http://wordpress.org/extend/plugins/more-types/

  2. idealien
    Member
    Posted 2 years ago #

    For anyone else encountering this issue, a quick fix to modify the plugin can resolve it has been tested with v1.1 of the plugin.

    In /wp-content/plugins/more-types/more-types-settings.php on line 340.

    //Comment out the line which generates the true / false boolean option
    //$row = array(__('Has archive', 'more-plugins'), $more_types_settings->settings_bool('has_archive') . $comment);
    //Replace it with one that uses the settings_input instead of settings_bool to generate a text field
    $row = array(__('Has archive', 'more-plugins'), $more_types_settings->settings_input('has_archive') . $comment);

    You will have to put 0 / 1 in if you want to maintain the false (0) / true (1) values for any subsequent modifications.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags