Genesis 1.9 Child – Post-Info, Post-Meta Problem

Community Forums Forums Design Tips and Tricks Genesis 1.9 Child – Post-Info, Post-Meta Problem

This topic is: not resolved

This topic contains 10 replies, has 3 voices, and was last updated by  RonnyMac 1 year, 10 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #11509

    RonnyMac
    Participant
    Post count: 61

    I’ve run into a CSS issue with the .post-info and .post-meta selectors in the new Genesis 1.9 Child theme.

    When information is removed from the Info and Post fields of Genesis Simple Edits, as expected, neither .post-info nor .post-meta information does not display on the page. However, the space where the information would display in .post-meta remains. It appears to be about 12 or 14 pixels or so.

    I removed every instance of .post-meta in the Child’s CSS file and the space remains. If I add .post-meta {margin:-12px;} the space collapses as expected.

    On posts in that category I’m not using h2.entry-title, but instead a combo of dl, dt, dd to wrap the permalink (all with zero margins). The same problem does not exist on another category which does use h2.entry-title.

    It’s the oddest thing. The .post-info space disappears/collapses properly above the entry content, but not the .post-meta space below the entry content.

    Any idea why the .post-meta would not collapse to zero when there’s no data in the Simple Edits .post-meta field?

     

    BTW – I’m using CSS Edit and MAMP for development, so there’s no public facing option to view.


    • This topic was modified 1 year, 10 months ago by  RonnyMac.
    • This topic was modified 1 year, 10 months ago by  RonnyMac.
    #11512

    Bill Murray
    Participant
    Post count: 575

    My quick take is that the post-meta div is still output, and the padding-top of 1.5rem near line 547 in the stylesheet applies, whether Simple Edits outputs anything or not.

    You can’t use Simple Edits to remove the div. You need to do a remove_action in your child theme’s functions.php.

    Hope that helps.


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #11515

    RonnyMac
    Participant
    Post count: 61

    Yes, the div is still output both for .post-info and .post-meta, whether the field contains information or not. However, completely removing .post-info and .post-meta from the CSS (all instances) still leaves the space, so something else it at play.

     

    I don’t want to remove_action yet, but would prefer to find out what the CSS is doing to cause the space. Reducing margin to zero and height to zero for .post-info and .post-meta will collapse the .post-info space, though not all the way. A healthy gap still appears.


    #11517

    Jon Bellah
    Participant
    Post count: 109

    You can use

    [css]
    .post-meta { display:none; }
    [/css]

    to “turn off” the div.


    Follow me on the Twitters at @JonBellah. I blog about web design, development and a lot about Genesis at CSSForge.com

    #11524

    Bill Murray
    Participant
    Post count: 575

    @RonnyMac – I hear you. It’s hard to say what your CSS is doing until it’s on a publicly available site. Is the space due to the bottom of the entry-content div?


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #11525

    RonnyMac
    Participant
    Post count: 61

    Yeah, this is a pain. I may park it somewhere for public view if my latest trial and error path doesn’t pan out. A client wants the same dt, dl, dd linked list method in Daring Fireball.

    The problem appears to be in dl, dt, and particularly dd. For a specific entry category the whole category’s entry should be wrapped in a dl, then permalink and title are wrapped in dt, then the entry is wrapped in dd. That’s not so easy to do in WordPress without major hackage. So, I wrapped the permalink and title and linked list link in a dl, with permalink and title link wrapped in a dt. The entry content was left alone. To validate the code there must be a dd, which would normally be the entry content itself. However, WP doesn’t make it easy to drop in the dd CSS, so I simply added a blank dd — <dd></dd>– which validates. However, it seems that dd needs to be removed from the CSS to remove the dd space. Odd. But it works. I’m just not sure why.

    ;-)


    #11526

    RonnyMac
    Participant
    Post count: 61

    Got it. Just don’t know how to fix it.

    The dl, dt, dd problem is solved for the .post-info space (as above).

    However, the space following the entry is actually caused by a blank date tag. The first post uses code in functions.php to assign CSS to the first.post so the date can be hidden (which also hides the date on subsequent posts in the same category, and on the same date. That works well for the first post but not for subsequent posts in the same category on the same date. The date div is still displayed.

    I don’t see an easy way out of that. Unless there’s a way to put a .first-post CSS or something similar on all posts in that category only on the most recent date.

    Sigh.

    In the words of Roseanne Roseannadanna, if it’s not one thing, it’s always something.


    #11532

    Bill Murray
    Participant
    Post count: 575

    And why don’t you want to remove post meta if you don’t want to display it?


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #11533

    RonnyMac
    Participant
    Post count: 61

    The intent is not to display .post-info or .post-meta. The problem ended up being a dt div, and a my_date() problem with the first post (whereby the date, though hidden in the first post via CSS, could not be hidden in subsequent posts in the same category. No easy fix, either.


    #11537

    Bill Murray
    Participant
    Post count: 575

    And what do you see as the difference between the intent of “not to display” and removing it – which thereby causes it not to display? Doesn’t that match the intent?


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #11547

    RonnyMac
    Participant
    Post count: 61

    Yes. But that wasn’t the problem. Removing all instances of .post-info and .post-meta also causes them to not display. Removing .post-info and .post-meta seems to have multiple definitions. I can remove the information in Genesis Simple Edits– a ‘remove’ which removes the information, but not the CSS, which is still formatted. Since I’m not using .post-info or .post-meta information, there’s no need to have it in the CSS file, either, hence the removal. However, as is often the case before removing CSS, I chose to ‘not display’ what was visible. Either way, the end result is the same.


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

You must be logged in to reply to this topic.