WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Posthaste] Selecting default category (4 posts)

  1. lealaurielle
    Member
    Posted 4 years ago #

    Hi. Instead of letting the drop down menu for the Category selection to display 'Category_', how can I change that to another text, say for instance, probably, 'Select Category'; or better still, set to display the default category when posting from the Posthaste form. Anyone? Many thanks in advance ya... cheers

    -Lea-

    http://wordpress.org/extend/plugins/posthaste/

  2. smajda
    Member
    Posted 4 years ago #

    To just change the default text, you can modify line 181, though standard disclaimers about modifying plugin code directly apply (updates will overwrite it, etc.)

    As for your "better still" request, you can look at my comment in line 182 to see that I too would rather have the default category selected by default, but I couldn't figure out how to get at it! It's been awhile though, so I'll go take a stab at it again & report back if I succeed. Anyone else know?

  3. smajda
    Member
    Posted 4 years ago #

    Ok, that was actually really easy. :) Just go to line 182 and replace it with the following:

    'selected' => get_option('default_category'),

    I'll include this in the next version of the plugin. Thanks for reminding me I needed to add this.

  4. smajda
    Member
    Posted 4 years ago #

    You can just download the plugin with these changes from github if you don't want to modify the code yourself: http://github.com/smajda/posthaste.

    I've got a few other things I'd like to do before releasing an official update on wordpress.org though.

Topic Closed

This topic has been closed to new replies.

About this Topic