WordPress.org

Ready to get started?Download WordPress

Forums

Popular Widget
Feature Request: Add Tab to Show Custom Category (6 posts)

  1. Denis Lam
    Member
    Posted 1 year ago #

    Possible to have a tab where I can choose "X" number of posts to be chosen from a desired post category?

    http://wordpress.org/extend/plugins/popular-widget/

  2. Hax
    Member
    Plugin Author

    Posted 1 year ago #

    you can filter your post by category id, this will only show post from the desired category

  3. Denis Lam
    Member
    Posted 1 year ago #

    But would that filter everything across all tabs? What if I only one tab to have filtered posts?

  4. diegonavland
    Member
    Posted 1 year ago #

    Denis did you found out how to do that?

  5. Hax
    Member
    Plugin Author

    Posted 1 year ago #

    To add a new tab use the "pop_defaults_tabs" filter, this an array of all available tabs.

    my_plugin_add_new_tab ( $tabs ){
      $tabs['new_tab'] = _('My new tab')
      return $tabs;
    }
    add_filter( 'pop_defaults_tabs', 'my_plugin_add_new_tab' )

    Then use "pop_new_tab_tab_content" action to output your tab content

    my_plugin_new_tab_content( ){
      return "content";
    }
    add_filter( 'pop_new_tab_tab_content', 'my_plugin_new_tab_content' );

    Be sure to use the latest version.

  6. Denis Lam
    Member
    Posted 11 months ago #

    I'll try this out after the bug in the latest version is resolved.

    Details:
    https://xparkmedia.com/support/topic/broken-after-latest-update/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.