The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. idealien
    Posted 4 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.


  2. idealien
    Posted 4 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

  • More Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic