Issue with Structured Data | Markup: microformats.org

resolved (5 posts) (2 voices)

  1. aedon
    Member

    @Elliott

    I'm using Elegance 2.6: http://fotograf-24.com/
    I had issues with hentry: author, updated, entry-title:

    The following is missing: author.
    The following is missing: entry-title.
    The following is missing: updated.

    I've solved the problem, at least partially, by making following changes:

    1. In elegance/lib/functions/theme.php I've changed the code around the line 1231

    from:

    $title = the_title( '<h2 class="post_title">', '</h2>', false );

    to:

    $title = the_title( '<h2 class="post_title entry-title">', '</h2>', false );

    1. In elegance/lib/shortcodes/ I've changed the code around the line 278

    from:

    $author = '<span class="meta_author">' . $attr['before'] . $attr['text'] . ' <a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a>' . $attr['after'] . '</span>';

    to:

    $author = '<span class="meta_author vcard author"> <span class="fn">' . $attr['before'] . $attr['text'] . ' <a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a>' . $attr['after'] . '</span> </span>';

    and around the line 295 of the same file

    from:

    $published = '<span class="meta_date">' . $attr['before'] . $attr['text'] . '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . sprintf( get_the_time( __( 'l, F jS, Y, g:i a', MYSITE_TEXTDOMAIN ) ) ) . '">' . sprintf( get_the_time( $attr['format'] ) ) . '</a>' . $attr['after'] . '</span>';

    to:

    $published = '<span class="meta_date date updated">' . $attr['before'] . $attr['text'] . '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . sprintf( get_the_time( __( 'l, F jS, Y, g:i a', MYSITE_TEXTDOMAIN ) ) ) . '">' . sprintf( get_the_time( $attr['format'] ) ) . '</a>' . $attr['after'] . '</span>';

    So all my posts display the correct data e.g.: http://fotograf-24.com/fotoreportage-in-vreden/
    On the Blog-Page itself, however, I'm still missing "entry-title" for all posts displayed: http://fotograf-24.com/fotoblog/
    I can't find a solution. So Elliott could you please help me?

    Thanx in advance
    Peter

    Posted 2 years ago #
  2. Elliott
    Support

    That should be around line 1230 in the theme.php file. Try clearing your browser cache and deactivate all plugins.

    Posted 2 years ago #
  3. aedon
    Member

    lo Elliott, sometimes I wonder if you even read the questions asked... So let me rephrase: If you make those changes to theme.php it only generates "entry-title" on single_blog_post BUT not on the blog_page. The blog_page in my case is generated through Elegance Settings (not the blog-shortcode)!

    Never mind. I helped myself by adding new "meta-output" in framework.php and a new function in _hidden.php file. It took me 3 hours 'coz I don't even remotely understand PHP. Now my fancy_meta works.

    Cheers
    Peter

    Attachments

    1. _hidden.png (77.2 KB, 2 downloads) 2 years old
    2. framework.png (87.5 KB, 0 downloads) 2 years old
    Posted 2 years ago #
  4. Elliott
    Support

    Yes I know but it should be line 1230 so I'm not sure why it's not working for you. Perhaps it was a caching issue.

    Posted 2 years ago #
  5. aedon
    Member

    It can't be working for nobody. You do realize there is a live checking tool for that provided directly by Google?: https://developers.google.com/structured-data/testing-tool/ and btw, disk cache is allays off in my Firefox. Nevertheless I've solved that issue, so it is OK for me.

    Posted 2 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme