All "entry content" displaying inside "entry header"

Community Forums Forums Design Tips and Tricks All "entry content" displaying inside "entry header"

This topic is: resolved

This topic contains 7 replies, has 3 voices, and was last updated by  lucaslem 4 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #107339

    lucaslem
    Participant
    Post count: 88

    I’m using Agency Pro theme and set up some custom fields for a custom post type. It’s working fine to the naked eye, but the markup is wrong. No matter what I do, all of the entry content displays inside the entry header div rather after it.

    Basic post markup:
    — [article class="entry ..."]
    — — [header class="entry-header"]…header stuff…[/header]
    — — [div class="entry-content"]…content stuff…[/div]
    — [/article]

    My CPT markup:
    — [article class="entry ..."]
    — — [header class="entry-header"]
    — — — …header stuff…
    — — — [ div class="entry-content"]…content stuff…[/div]
    — — [/header]
    — [/article]

    Sorry I can’t post to the page itself but I’m working locally. Here is my code in case anyone wants to take a stab at it. Been at it all day with google and I bet it’s some silly little thing I’m missing.

    #107350

    lucaslem
    Participant
    Post count: 88

    FYI the HTML debugging is telling me that there is no closing tag for <header class=”entry-header”>. I’m not messing with any of the theme’s html, so I’m guessing there must be some additional code I need to include in the add_action or in my function.

    #107356

    Stefsull
    Participant
    Post count: 47

    I’m using a different theme, so this may be offbase, but in mine to appear after the header (and not within it) I would start the code with:

    add_action( 'genesis_after_header', 'olotus_offerings_subhead' );

    Have you tried that?

    #107357

    lucaslem
    Participant
    Post count: 88

    Nothing like posting to forum to finally solve the problem on your own!
    So my bad: I had code elsewhere in my functions file to remove the header entry meta for that cpt, and I had also removed the header markup.

    #107358

    Stefsull
    Participant
    Post count: 47

    Goodonya. Oh how I wish the problem I posted about the time you did turned out the simple. :)

    Cheers

    #107365

    lucaslem
    Participant
    Post count: 88

    Thanks!

    Actually, it was a bit different because I wanted some of the code to go within the header and some of it after (in entry content)… but the closing header tag was missing because I had added this in my functions file (I wanted to get rid of the post info):

    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    remove_action( 'genesis_entry_header', 'genesis_post_info' );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 15 );

    As soon as I got rid of the first and third line, I was good: post info gone, markup still there.

    #107368

    braddalton
    Participant
    Post count: 10243

    And this can be changed as well
    [php]
    if ( is_single() && ‘offerings’ == get_post_type()\
    [/php]

    Try this:

    [php]
    if ( is_singular( ‘offerings’ ))
    [/php]

    This is how i code custom meta boxes and use genesis_get_custom_field http://wpsites.net/wordpress-admin/custom-meta-box-text-area/


    #107465

    lucaslem
    Participant
    Post count: 88

    Brad, thank-you for the cleaner code tip! Still learning :)

    Also thanks for the link to your post. This is really great for learning as even though I have been using ACF (which is by all accounts a solid plugin), I always like to know how things are actually built and how they work. May code a few of these boxes by hand following your method for practice :)

    Are you at all involved with WP Mentor? Do you ever do code reviews? Doesn’t hurt to ask, right? ;)

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

You must be logged in to reply to this topic.