• Resolved iuchewie

    (@iuchewie)


    Good afternoon folks. I’ve got a custom author page located at https://talkflop.com/blog/?author=2 which is utilizing the User Photo plugin – https://www.ads-software.com/extend/plugins/user-photo/

    I’m trying to figure out how to put padding around the user photo on this page and I can’t for the life of me get it… any help would be greatly appreciated. Here’s the code for the authors.php page.

    Thanks in advance.

    chewie

    authors.php

    <?php get_header(); ?>
    
            <div id="menu1">
            <ul>
            <li class="page_item current_page_item"><a href="<?php bloginfo('url'); ?>/" title="Homepage">Home</a></li>
    		<?php wp_list_pages('title_li=0&depth=1'); ?>
            </ul>
            </div>
        </div><!-- end header -->
    
    <hr />
    
    <div id="wrapper">
    <div id="content">
    
    <?php
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($author_name);
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>
    <h2>About <?php echo $curauth->nickname; ?></h2>
    <?php the_post(); userphoto_the_author_photo('', '', array(align => 'right', border =>'1')); rewind_posts(); ?>
    
    <?php echo $curauth->user_description; ?>
    
    <h2><?php echo $curauth->nickname; ?>'s Posts</h2>
    <p>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    	<?php
         $time = get_the_time('M d Y');
         list($mo, $da, $ye) = explode(" ", $time);
    	?>
        <div class="date" title="<?php the_time('d-m-Y'); ?>">
        <p>
             <span class="mese"><?php echo($mo); ?></span>
             <span class="giorno"><?php echo($da); ?></span>
             <span class="anno"><?php echo($ye); ?></span>
        </p>
        </div>
    	 <h2 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    	<div class="meta"><span class="tags"><?php _e("Category:"); ?> <?php the_category(',') ?></span> — <span class="user"><?php the_author_posts_link(); ?></p> @ <?php the_time() ?></span> <?php edit_post_link(__('Edit This')); ?></div>
    
    	<div class="storycontent">
    		<?php the_content("Continue reading " . the_title('"', '"', false)); ?>
    
    		<?php if (function_exists('the_tags')): ?>
    		<p class="meta"><?php the_tags('Tags: ',', '); ?></p>
    		<?php endif;?>
    	</div>
    	<div class="feedback">
    		<?php wp_link_pages(); ?>
    		<p><?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></p>
    	</div>
    
    </div>
    <hr />
    <?php comments_template(); // Get wp-comments.php template ?>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • if you just add this style to your css it will padd all images

    img {
    	padding: 5px;
    }

    now you need the specific image of the author right?
    the image is a part of teh post
    best you can do is add this style, i am sure you can do better but this should do the trick

    div#content img {
    	padding: 5px;
    }
    Thread Starter iuchewie

    (@iuchewie)

    the first one won’t work because i don’t want to pad ALL images… just the author image.

    where should i add this second code vachi? to the main style.css file?

    Thread Starter iuchewie

    (@iuchewie)

    just another update… i tried to add this one

    div#content img {
    	padding: 5px;
    }

    and it’s essentially like the other one… it adds padding to all images… not just the author image.

    any other ideas?

    Thread Starter iuchewie

    (@iuchewie)

    FINALLY figured this out… how do i mark a topic “closed”?

    why don’t you post your solution pleasE?

    Thread Starter iuchewie

    (@iuchewie)

    sorry about that… was planning on it and then i got a client call…

    actually just ended up putting the padding right in the code where i call the author image:

    <?php the_post(); userphoto_the_author_photo('', '', array(vspace => '5', hspace => '5', align => 'right', border =>'1')); rewind_posts(); ?>

    worked like a charm.

    thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Looking for some help with my authors page…’ is closed to new replies.