WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] wrong manage_columns authors link for custom post types (5 posts)

  1. thomask
    Member
    Posted 1 year ago #

    When I am using custom post type with co authors plugin, it creates column with the author names with link like
    .../wp-admin/edit.php?author=2
    but it keeps the same link even on custom post type, so link without post_type=???
    and also the filtering then works wrong as even if i put the post_type to the url with author, it does not filter it

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    This is already fixed in an upcoming version.

  3. thomask
    Member
    Posted 1 year ago #

    Great. Not sure, how did you do it, so just one quick idea - you should use add_query_arg like

    echo '<a href="'.add_query_arg( array('author' => $author->ID) ).'">'.$author->name.'</a>';

    This way it would work even with any other parameters, so e.g. i could do search and then filter found posts by author.

    P.S.: I know that you probably know this ;-)

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    I think the default behavior of core is to simply drop existing query args. For instance, if you were already filtering to one author, you wouldn't want to filter to a second author.

  5. thomask
    Member
    Posted 1 year ago #

    if you would do this as i wrote it, it would actualy REPLACE the author as it is the same parameter as in current url, so your example would work.
    IMO if a user first filter by category (or do search, or other filter) and then click an author, he wants to filter by both. If not, he can simply clear the first filter.
    another option would be to add both, e.g. something like [Tomas Kapler][+], and clicking the plus would add it to query and clicking just a name would replace it. It could be shown this way only when there is some param (other then posttype) in current query, so it would not confuse ordinary users.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic