The MU forums have moved to WordPress.org

AHP Sitewide Recent Posts plugin output configuration (5 posts)

  1. MrMarco
    Member
    Posted 14 years ago #

    I've got the plugin working ALMOST perfectly for what I'd like. It seems to be set up to give a 'list' of recent posts which of course is great if put in a side bar. But I have to make things difficult... lol

    I put the call code in my header-default.php. It works fine, except I'd like it to show the recent posts side by side instead of in a list similar to below.

    Post date Post Date Post Date
    Post title Post Title Post Title

    I'm looking within the plugins php file and getting cross eyed trying to find where I can change the code to allow this. Of course it may not be there at all and I'd have to do some kind of css fix but I'm not sure. So i come to you all with much more knowledge than I for some direction.

    Thank you

  2. andrea_r
    Moderator
    Posted 14 years ago #

    It outputs the post inside an unordered list, so you can change the markup for that inside the plguin, then use some styling within the theme you're showing it on.

  3. MrMarco
    Member
    Posted 14 years ago #

    It outputs the post inside an unordered list, so you can change the markup for that inside the plguin, then use some styling within the theme you're showing it on.

    With my less than acceptable knowledge of php I'm doing my best. I have a couple of friends trying to help as well. Still can't get the coding correctly so that it shows the way I'd like.

    Still trying and trying. Can't give up. I know I'm close! lol

  4. andrea_r
    Moderator
    Posted 14 years ago #

    Well, you can keep it in the unordered list, for starters.
    Put the date in h6 tags, that'll bump the title below it (or put the title in h2 tags, that'll be better).

    For the columns, do this:

    li {display:inline}

    Nothing to do with the php in this case, all to do with the css.

  5. MrMarco
    Member
    Posted 14 years ago #

    Ok just a final update on this issue so it may help someone else coming along. After some trial and error some friends and I came up with a relatively good fix. Still a tiny bit short on my needs but pretty darn close.

    I put this in my css file:

    .ahp_wrapper {
    width:900px;
    margin-left:auto;
    margin-right:auto;
    }

    and changed the call function to this:

    <div class="ahp_wrapper"><?php ahp_recent_posts(5, 30, 255, 30, '<div class="ahp_recent-posts">','</div>'); ?></div>

    Now this allowed the output to read in a linear fashion as opposed to in a column which is what I wanted as I have the output running across the top of my header.

    I would love it to be a fluid centering no matter how many outputs there are. But this is as close as I can get it and it works well enough I guess.

    Also, I'm not clear as to what the need for the "255, 30" numbers are for in the call function. It was sort of explained to me but didn't make sense. I'll have to learn this a little more in-depth sometime. lol

    Thanks Andrea for your help.

About this Topic