WordPress.org

Ready to get started?Download WordPress

Forums

Starbox - the Author Box for Humans
[resolved] Multiplie Starboxes on one page? (7 posts)

  1. Sikth
    Member
    Posted 9 months ago #

    Hi!
    I want to create a "All Authors"-page, where all the authors boxes are listed after each other. I have been trying this with many authors plugin and none seams to work easy. I think this is the best so why not get it to work with this then.

    Maybe the php code in earlier posts, but manually set the user-id?
    I only need to list say, 2-10, and that is not much work with a template.

    Any ideas?

    http://wordpress.org/plugins/starbox/

  2. Squirrly UK
    Member
    Plugin Author

    Posted 9 months ago #

    Hey,

    You can use a function like this one:

    add_action('init','starBoxCustom');
    
    function starBoxCustom(){
            if (!class_exists('ABH_Controllers_Frontend'))
                return;
    
            ABH_Classes_ObjController::getController('ABH_Controllers_Frontend')->custom = true;
    }
    function starBoxShowAll() {
            if (!class_exists('ABH_Controllers_Frontend'))
                return;
    
            ABH_Classes_ObjController::getController('ABH_Classes_Tools');
    
            $args = array(
                'orderyby' => 'post_count',
                'order' => 'DESC'
            );
    
            $users = get_users($args);
            $theme = ABH_Classes_Tools::getOption('abh_theme');
    
            $str = '';
            $str .= '<script type="text/javascript" src="' . _ABH_ALL_THEMES_URL_ . $theme . '/js/frontend.js?ver=' . ABH_VERSION . '"></script>';
            $str .= '<link rel="stylesheet"  href="' . _ABH_ALL_THEMES_URL_ . $theme . '/css/frontend.css?ver=' . ABH_VERSION . '" type="text/css" media="all" />';
    
            foreach ($users as $user) {
                $str .= ABH_Classes_ObjController::getController('ABH_Controllers_Frontend')->showBox($user->ID);
            }
    
            return $str;
        }

    Now just call starBoxShowAll(); where you want to add it.

    Good luck!
    Calin

  3. Gemini23
    Member
    Posted 9 months ago #

    Hi, I would like to do exactly the same... where is the above code placed? in the functions.php or in a separate file? what name does that file have.

    and is the "starBoxShowAll();" placed within a Page?

  4. esmi
    Forum Moderator
    Posted 9 months ago #

    @Gemini23: As per the Forum Welcome, please post your own topic.

  5. Gemini23
    Member
    Posted 9 months ago #

    I would.. but it is EXACTLY the same topic... just need clarification on what has been written above...

  6. esmi
    Forum Moderator
    Posted 9 months ago #

    These forums have rules. Please read them.

    As you will see, one of these rules - entitled Where toPost - specifically states:

    Unless you are using the same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme & configurations as the original poster, do not post in someone else's thread. Start your own topic.

    Please abide by this and do not argue when you are asked to post your own topic.

  7. Squirrly UK
    Member
    Plugin Author

    Posted 9 months ago #

    Hey,

    Am made a simpler option for you.

    Reinstall Starbox (you will not lose you current starbox settings)
    Just add the shortcode

    [starbox id=all]

    Calin

Reply

You must log in to post.

About this Plugin

About this Topic