widget featured page + post

Community Forums Forums General Discussion widget featured page + post

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  cehwitham 1 year, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18201

    jvandemerwe
    Participant
    Post count: 2

    I would like to make a suggestion for improvement on these widgets. It would be nice to have a class “last” added to the last post in the widget-area container. This is very useful if you have a responsive layout and you want to set a display:none to the last post when this one is uneven. For example you show 9 posts on a big display (3×3), but want to show only 8 on a smartphone (4×2). I know I can change this also myself in the genesis template, but with the next update it is gone again.

    Also it is recommended to have wrappers around the image and the content, as well around the post itself. This works easier when you want to work with padding, without messing with the percentages on the whole post in your CSS.

    • This topic was modified 1 year, 5 months ago by  jvandemerwe. Reason: improvement of text
    • This topic was modified 1 year, 5 months ago by  jvandemerwe. Reason: improvement of text
    #21238

    cehwitham
    Participant
    Post count: 396

    The CSS Last Child selector may help you here:

    http://www.w3schools.com/cssref/sel_last-child.asp

    Also you shouldn’t make changes to Genesis Core as as you say, it gets removed in the update. It’s better to use hooks and filters to amend the output.

    You can also add your own wrappers using hooks. For example create 2 functions to output the opening of the wrapper and the closing of the wrapper then hook on to the before content hook and one onto the after content hook.

    The hook reference might be useful to you: http://my.studiopress.com/docs/hook-reference/


    Twitter: cehwitham Web: cehwitham.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.