开发者

Best way to add two row list for CMS (wordpress)

What is the best way for me to add a two row list with employees to a Wordpress CMS?

Like this: live example

| picture | personal data |

In the example above I've used a table, but this would properly work better created as CSS.

I need a way for the client to add ne开发者_StackOverflow社区w employees without writing ANY code. I've considered using the image caption (but I can't style it the way I want) or create a list UL - LI I've also looked at some table plugins, but it isn't exactly working as I need. Perhaps I need to write such a plugin?

Any ideas as to how I can solve this problem?


I've solved the problem :-D

I simply have to add new user profiles as 'subscriber' and install the 'user photo' plugin. Then I can display the user data the way I want.

This is what I ended up using:

<div class="personale_table">
<?php
$wp_user_search = $wpdb->get_results("SELECT ID, display_name FROM $wpdb->users ORDER BY ID");
foreach ( $wp_user_search as $userid ) {
                    $user_id       = (int) $userid->ID;
                    $user_login    = stripslashes($userid->user_login);
                    $display_name  = stripslashes($userid->display_name);
                    $user_info     = get_userdata($user_id);
                 ?>
<?php
                    echo('<div class="personale_thumb personale_ramme">' . get_avatar($user_id) . '</div>');
                    echo('<div class="personale_data"><div class="personale_linje personale_title">' . $user_info->first_name . ' ' . $user_info->last_name .  '</div>');
                    echo('<div class="personale_linje personale_stilling">' . $user_info->aim . '</div><div class="personale_linje">' . $user_info->yim. '</div><div class="personale_linje"><a href="mailto:' . $user_info->user_email . '">' . $user_info->user_email . '</a></div><div class="personale_linje">' . $user_info->jabber . '</div></div>');
                }
                ?>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜