Viewing 10 replies - 1 through 10 (of 10 total)
  • Brook

    (@brook-tribe)

    Howdy Calvin,

    That is strange that an update changed that behavior. Have you tried passing the post ID of the event to the_title_attribute()? That should work. If it doesn’t, does the_title() also return null?

    – Brook

    Thread Starter Calvin

    (@calvin_makes)

    Hey Brook,

    I’m using this to check the ID:

    var_dump(get_the_ID());

    It’s returning “0”, which doesn’t seem write. The edit URL shows “post=4”.

    Plugin Author Brian

    (@brianjessee)

    Hi,

    I think if you are using get_the_id() in the admin it would not work.

    That would work in the loop in the front end.

    In the admin I usually use this to get the id:

    global $post
    $post->ID
    Thread Starter Calvin

    (@calvin_makes)

    This method still returns “0”.

    Just to give you an idea, I am building with a child theme on Genesis, and hooking the function that outputs the title in the genesis_setup function.

    Plugin Author Brian

    (@brianjessee)

    Hi,

    Thanks for the info.

    If everything is returning 0 that is most likely then way to early to get an id then.

    You will have to try it with a later hook to get it to work.

    Thread Starter Calvin

    (@calvin_makes)

    Meaning that the function is effectively being injected into the loop for the title of the page…or at least as my understanding puts it.

    What I don’t really get is that it works on some sites but not others. Any idea what might be causing that scenario?

    Thread Starter Calvin

    (@calvin_makes)

    Not too sure whats causing it. I’m in the middle of rebuilding the theme, however, and it doesn’t seem to be an issue.

    Probably something I’m doing, just have no idea what.

    Anyway, thanks for your help!

    Brook

    (@brook-tribe)

    You’re welcome! Definitely a puzzling issue. Thanks for letting us know its working for now.

    – brook

    Thread Starter Calvin

    (@calvin_makes)

    Hi again,

    Sorry to bring this up but the issue is happening again, though it seems as though it’s only on a brand new install when an Event is the only thing I’ve created (minus the default sample posts).

    Is there anyway I could show you my code by sending the theme to you to have you look?

    I have NO idea why this is happening.

    Hey Calvin,

    Your willingness to share your theme to push this issue forward is appreciated, but is unfortunately beyond the scope of support we can provide here on the free forums.

    There are qualities about this issue that seem to imply that it is unique to your site, or resulting from odd code conflicts with your theme or another plugin or something. These are those qualities, namely:

    • You mention that this issue happens on some sites, but not others
    • when you were rebuilding the theme, you said it wasn’t an issue (“I’m in the middle of rebuilding the theme, however, and it doesn’t seem to be an issue.”)
    • I/we cannot recreate this issue locally…

    If we can end up recreating this issue locally, be assured that we’ll report it as a bug, figure out the cause, and fix it promptly.

    Until then, then unfortunately there may not be much we can do from our end of things.

    One last thing:

    Earlier in this thread, you said:

    I am building with a child theme on Genesis, and hooking the function that outputs the title in the genesis_setup function.

    It may possible that using Genesis or a child theme specifically are origins of this problem – if you notice that in all other themes you try, the issue does not persist, but in Genesis and/or in your child theme it does, that’s a solid indicator of those things being the culprit here…

    Sorry to bear bad news Calvin.

    Cheers,
    George

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘the_title_attribute( 'echo=0' ) returns NULL on single Event pages.’ is closed to new replies.