The MU forums have moved to WordPress.org

CETS Featured Blog Plugin - Styling (12 posts)

  1. scotm
    Member
    Posted 14 years ago #

    Hi

    Wondering if someone could help me style the output of the cets_featured_blog plugin from wpmudev.org. The plugin provides the avatar and recent posts from a selected blog ID in your wpmu install, but I was hoping to add the 'username' and 'date' to the output similar to Twitter's. Here's the code:

    <?php echo get_avatar( get_the_author_email(), '50' ); ?>&nbsp;<a href="<?php the_permalink() ?>" class="headline" title="Permanent Link to <?php if ( get_the_title() ) the_title(); else the_ID(); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a>

    Great plugin!

    Thx

  2. kgraeme
    Member
    Posted 14 years ago #

    Deanna just updated it to 1.1 to include the date. We talked about what else to include and I don't recall if author came up. I know we talked about tags and that it wasn't pulling them right, so that's probably out. Author is probably possible, but the avatar it will grab is just the blog owner not a post by post avatar and I think we were thinking of author in the same way.

    Ask on her blog.

  3. DeannaS
    Member
    Posted 14 years ago #

    Actually, the author it pulls for the picture is defined in the settings of the widget. I didn't add a post by post author, but I can add that. Give me a little bit and I'll get it updated.

  4. DeannaS
    Member
    Posted 14 years ago #

    Okey doke. All done. Get it here.

  5. scotm
    Member
    Posted 14 years ago #

    DeannaS

    So will the output now look something like this or some variation?

    Avatar - author
    post content
    date

    Also, originally I was under the impression that only one user could be included in the output, but after testing with two users separated by a comma in the widget last night it worked fine (both authors' posts were included). So I'm correct on that point as well?

    Thx

  6. DeannaS
    Member
    Posted 14 years ago #

    Um.... it's currently outputting as:
    Avatar
    Title
    date
    author
    content

    If you want to mess around with the ordering, you'll have to do that directly in the code, but it's fairly easy to do. Each bit is wrapped in a div, so just move the divs around. There's some turning off and on of PHP that you'll need to be careful of, though.

    By default, it includes the AVATAR of the author you assign, but all the most recent posts. I'm not filtering posts by author. I could fairly easily add the ability to limit the posts to one author, if that's something people want.

  7. scotm
    Member
    Posted 14 years ago #

    OK, I haven't seen the latest version so it sounds like you've got it all covered off. Do you have a demo anywhere right now?

    Cheers

  8. DeannaS
    Member
    Posted 14 years ago #

    Um...nope, no demo...maybe some day I'll put together a demo site. :) Just grab the new code and overwrite your existing files. Upgrade is super easy.

  9. scotm
    Member
    Posted 14 years ago #

    Gotcha! Thanks for this...

  10. scotm
    Member
    Posted 14 years ago #

    DeannaS

    Correct me if I'm wrong, but the plugin assumes there is one author of the blog, hence the use of the avatar at the top. I am using multiple authors, with P2 theme, and was hoping the avatar for each author could appear for each post.

  11. DeannaS
    Member
    Posted 14 years ago #

    @scotm - It wouldn't be hard to do. It's just not what we needed in our blog, so it's not how I coded it. If you look at the existing code, there should be enough there to get you started. Also, take a look at how avatars are shown in the comments on a theme you like, and combine the two code sources to get it to do what you want. Make sense?

  12. scotm
    Member
    Posted 14 years ago #

    Gotcha...

About this Topic