Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
681 views
in Themes by
edited by

Usual, it shows all data together: 

 

I want show separate Picture, Name and Category.

 

How it's possible ? :)

 

 

Q2A version: last

1 Answer

0 votes
by

Hi Zubenko,

The picture, name and date metadata is created in post_avatar_meta function that calls the post_meta function (qa-theme-base.php file). You can override these functions in your qa-theme.php file. For example, you could use this modified post_meta function that include the span tags inside the foreach loop creating one span for each metadata.

function post_meta($post, $class, $prefix=null, $separator='<br/>')
{
    
    $order=explode('^', @$post['meta_order']);
    
    foreach ($order as $element){
    
        $this->output('<span class="'.$class.'-meta">');
        
        if (isset($prefix))
            $this->output($prefix);
            
        switch ($element) {
            case 'what':
                $this->post_meta_what($post, $class);
                break;
                
            case 'when':
                $this->post_meta_when($post, $class);
                break;
                
            case 'where':
                $this->post_meta_where($post, $class);
                break;
                
            case 'who':
                $this->post_meta_who($post, $class);
                break;
        }
        
        $this->output('</span>');
    }
    
    $this->output('<span class="'.$class.'-meta">');
    $this->post_meta_flags($post, $class);
    $this->output('</span>');
    
    if (!empty($post['what_2'])) {
        $this->output($separator);
        
        foreach ($order as $element){
            $this->output('<span class="'.$class.'-meta">');
            
            if (isset($prefix))
                $this->output($prefix);
            
            switch ($element) {
                case 'what':
                    $this->output('<span class="'.$class.'-what">'.$post['what_2'].'</span>');
                    break;
                
                case 'when':
                    $this->output_split(@$post['when_2'], $class.'-when');
                    break;
                
                case 'who':
                    $this->output_split(@$post['who_2'], $class.'-who');
                    break;
            }
            
            $this->output('</span>');
        }
    }
}

Also you can change the post_avatar_meta function to separate the avatar picture and the meta info:

function post_avatar_meta($post, $class, $avatarprefix=null, $metaprefix=null, $metaseparator='<br/>')
{
    $this->output('<span class="'.$class.'-avatar-meta">');
    $this->post_avatar($post, $class, $avatarprefix);
    $this->output('</span>');
    
    $this->output('<span class="'.$class.'-avatar-meta">');
    $this->post_meta($post, $class, $metaprefix, $metaseparator);
    $this->output('</span>');
}

Q2A version: 1.6.2

Hope it helps,

Jorge

...