Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #386730

    postslider.php:385

    $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    $output .= "</div>";

    The markup helper is returning the first date/time in the loop with ‘get_the_time’ function. This is causing all of the posts in the slider to have the same datepublished schema.

    #387166

    Hi aghadiry!

    I tested on my end but it’s not doing the same for me. What version of Enfold are you using? If it’s not the latest, 3.0.7, then be sure to update.

    Cheers!
    Elliott

    #400172

    Elliott, still seeing this issue on the latest version. Check the following:

    https://developers.google.com/webmasters/structured-data/testing-tool?url=https%253A%252F%252Fnutrigi.com%252F

    Look under Blog -> datePublished.

    The datePublished should be different on all of the blog posts.

    #400484

    Hey!

    Thank you for the info.

    We already reported the issue to Kriesi. For now, please edit postslider.php. Look for this code:

    $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    $output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    

    Replace it with:

    $output .= "<time class='slide-meta-time updated' itemprop='datePublished' datetime='".get_the_time(get_option('date_format'), $the_id)."'>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    

    Cheers!
    Ismael

    #409000

    Hey!

    thanks for the notice was able to fix the issue ;)

    Best regards,
    Kriesi

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Post Slider schema.org incorrect for datepublished’ is closed to new replies.