• Resolved nickaster

    (@nickaster)


    HI there.

    I found this really helpful guide to category archives which makes it possible to make some categories specially treated, ie using a template called “Category-xxx.php”

    Can the same thing be done with Authors? I have one author who needs a special page, distinct from the standard author pages.

    Possible?

    Now that I think about it – regardless of heirarchy, how can I create just a “page” that shows only posts from one particular author? That would be an okay solution except that clicking on the authors name on a post wouldn’t go to the special page but rather to the generic author page…

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter nickaster

    (@nickaster)

    Yeah, that’s what I was looking at, but doesn’t look like you can create a template specific to an Author ID in the same way that you can with categories, right? I’m talking about the hierarchy.

    Thread Starter nickaster

    (@nickaster)

    So…. assuming I’m right about the template hierarchy, I’d guess I can make changes to the regular author.php file that might say “if author id is 123” then display this extra bunch of stuff, or skip this area…

    Is that sort of thing possible? Is there some example code lying around? The codex seems pretty devoid of anything describing this.

    Totally devoid, we got nothing here on that kind of thing. ??

    Thread Starter nickaster

    (@nickaster)

    Thanks doodlebee. Can you point me to an example of how to properly use this? ie… this obviously doesn’t work:

    <?php
    is_author('104') {
    blah blah blah
    };
    		?>

    So… for sake of example, just print “blah blah blah” if the author is number 104. What’s the right way to do that?

    if you’re going to create an author.php file, then the above code you posted doesn’t really do anything. You’re looking for something more like:

    <?php
    if(is_author(‘104’)) { ?>
    blah blah blah
    <?php } else if(is_author(‘105’)) { ?>
    snickerdoodle
    <?php } ?>

    Here’s a couple of examples for you to look at for other methods.

    Thread Starter nickaster

    (@nickaster)

    phenomenal! thank you. that’s exactly what I neeeded

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Author Page for a Special Author’ is closed to new replies.