Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    Using CSS. Sorry, I can’t provide support for custom implementations of my plugins. Also, for what it’s worth there is a counter property available in the global $user object. $user->count. You should also be able to override content-author.php in your plugin and tweak the main user div classes if you need.

    Hi, can you help me with two column per page? how I can make this? any solution? tip? I’m not very good with php

    Plugin Author HelgaTheViking

    (@helgatheviking)

    As I already replied above, this probably doable with CSS. I do not provide support for custom implementations.

    Ok, I know You not provide support, but maybe someone else can do this or know how to do that. I know how change “design” with single user view but don’t know how just made 2 columns. Any tips will be good.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Well @afjsystem never came back and posted his solution. Something like this should work in modern browser:

    .author-block {
        width: 48%;
        margin-right: 3.8%;
        float: left;
        margin-bottom: 1.5em;
    }
    /* 2,4,6 */
    .author-block:nth-of-type(2n) {
        margin-right: 0;
    }
    /* 1,3,5 */
    .author-block:nth-of-type(2n+1) {
        clear: both;
    }

    Since you are using two columns, you could probably use nth-of-type(even) and nth-of-type(odd), but I will leave it this way for people who want to adjust for more columns.

    See this fiddle for an example:
    https://jsfiddle.net/HbtBL/2/

    Nth of type
    https://webdesign.about.com/od/csspseudoproperties/p/nth-of-type.htm

    Hi, thanks for that ?? I make this like that and looks good :), I’m not sure I make this in correct way but looks good.

    I got another question, I use plugin User Control (https://www.iwebux.com/disableenable-wordpress-users/) to turn of users account, but not delete them, and I want show on my list only user with status “enable”. Did you think is any chance do that?

    <?php
    /**
     * The Template for displaying Author listings
     *
     * Override this template by copying it to yourtheme/authors/content-author.php
     *
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $user;
    
    $user_info = get_userdata($user->ID);
    $num_posts = count_user_posts ( $user->ID );
    ?>
    <style>
    html, body {
    	margin: 0;
    	padding: 0;
    	width: 100%;
    	height: 100%;
    }
    
    .content {
    	min-height: 100%;
    	position: relative;
    	overflow: auto;
    	z-index: 0;
    }
    
    .background {
    	position: absolute;
    	z-index: -1;
    	top: 0;
    	bottom: 0;
    	margin: 0;
    	padding: 0;
    }
    
    .top_block {
    	width: 100%;
    	display: block;
    }
    
    .bottom_block {
    	position: absolute;
    	width: 100%;
    	display: block;
    	bottom: 0;
    }
    
    .left_block {
    	display: block;
    	float: left;
    }
    
    .right_block {
    	display: block;
    	float: right;
    }
    
    .center_block {
    	display: block;
    	width: auto;
    }
    
    .background.block_left {
    	height: auto !important;
    	padding-bottom: 0;
    	left: 0;
    	width: 70px;
    	background-color: #9999ff;
    }
    
    .block_left {
    	height: auto;
    	width: 110px;
    	padding-bottom: 0px;
    }
    
    .background.block_content {
    	height: auto !important;
    	padding-bottom: 0;
    	left: 0;
    	right: 0;
    	background-color: #999999;
    	margin-left: 70px;
    }
    
    .block_content {
    	width: auto;
    	height: auto;
    	padding-bottom: 0px;
    	word-wrap: break-word;
    }
    .author-block {
       width: 48%;
       margin-right: 3.8%;
       float: left;
       margin-bottom: 1.5em;
    }
    /* 2,4,6 */
    .author-block:nth-of-type(2n) {
       margin-right: 0;
    }
    /* 1,3,5 */
    .author-block:nth-of-type(2n+1) {
       clear: both;
    }
    </style>
    <div id="user-<?php echo $user->ID; ?>" class="author-block">
    
    	<div class="left_block block_left"><a target="_self" href="<?php echo get_author_posts_url($user->ID); ?>">
    <?php echo get_avatar( $user->ID, 100 ); ?></a></div>
    	<div class="center_block block_content"><b><i><a href="<?php echo get_author_posts_url($user->ID); ?>"><?php echo $user_info->display_name; ?></a></b></i>
    	<p><?php echo $user_info->description; ?></p></div>
    
    </div>
    Plugin Author HelgaTheViking

    (@helgatheviking)

    Sorry I am not familiar with that plugin or how it marks a user as disabled.

    I suspect you’d be able to run a meta query? Either directly in the shortcode, via filtering sul_user_query_args or via filtering pre_user_query.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘two column per page’ is closed to new replies.