• Resolved chadchadchad

    (@chadchadchad)


    Hello,

    I have this in my author.php
    <?php printf( __( 'Author Archives: <span class="vcard">%s</span>' ), "<h3 class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</h3>" ) ?>
    My problem is that I only want the author name to display and my php skills are nonexistent….any help would be much appreciated.
    thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • I think this code only gets the archive name “Author Archives” and the author name.

    Is there any meta code beneith that? something like (this is twentyten theme):

    <?php
    // If a user has filled out their description, show a bio on their entries.
    if ( get_the_author_meta( 'description' ) ) : ?>
    					<div id="entry-author-info">
    						<div id="author-avatar">
    							<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
    						</div><!-- #author-avatar -->
    						<div id="author-description">
    							<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
    							<?php the_author_meta( 'description' ); ?>
    						</div><!-- #author-description	-->
    					</div><!-- #entry-author-info -->
    <?php endif; ?>

    If so, it’s probably doing the other output you want to remove.

    Thread Starter chadchadchad

    (@chadchadchad)

    Thanks deepbevel, but that actually just displayed blank for me, as far as I know all the meta code (unless you don’t mean meta tags) is in the header.php. I am trying to make this WP as the blog for a site and boy it’s a great deal easier said than done.

    Basically when you click author I just want it to display the author’s name without anything before it.

    please post a link, it will be easier to make sure I understand.

    Thread Starter chadchadchad

    (@chadchadchad)

    Here is the link
    Basically I tried to get it to just display name but can’t seem to get rid of the “Author Archives:” without getting an error.

    Try this:

    <?php printf( __( '' ), "<h3 class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</h3>" ) ?>
    Thread Starter chadchadchad

    (@chadchadchad)

    Thanks Josh, I tried that code and it ended up blank…..it really seems like something easy but it’s killing me :).

    What happens if you change it to this:

    <?php printf( __( 'TESTING: <span class="vcard">%s</span>' ), "<h3 class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</h3>" ) ?>

    Does it change the text from Author Archives to Testing?

    Thread Starter chadchadchad

    (@chadchadchad)

    yes sir, perhaps I should just remove the 2nd part and switch the first part to the h3 tags.

    Well, I’m not sure exactly how the author has utilized that code from the other side… but maybe this??

    <?php printf( __( '<span class="vcard">%s</span>' ), "<h3 class='url fn n' href='$authordata->user_url' title='$authordata->display_name' rel='me'>$authordata->display_name</h3>" ) ?>
    Thread Starter chadchadchad

    (@chadchadchad)

    Josh that worked! I had been chewing on my keyboard for a good part of the day running out of ideas, thanks so much!

    No worries ??

    Glad you got it resolved!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Change Author Display’ is closed to new replies.