Tagged: 

Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #662673

    Hello,

    I am very happy with the Enfold theme. Briljant.
    But..
    In my Webmaster Tools I see a hentry error on pages with a masonry gallery. like http://rogercremers.com/portrait/

    The error only shows up on pages with ‘Element caption’ is ‘display title’, on pages with ‘Element caption’ is selected to ‘display neither’ there is no problem.

    The error is missing Author and missing updated.

    Is it possible to fix this ?

    thanks in advance,

    Roger

    #664120

    Hey Roger,

    Thank you for using Enfold.

    The masonry element do not contain the author info by default because it is not usually use to display blog posts. The masonry element is commonly use to showcase an individual or a company’s portfolio or projects. You will have to modify the masonry shortcode file if you want to add that info. Please hire a freelance developer or contact codeable: http://kriesi.at/contact

    Best regards,
    Ismael

    #668460

    Hello Ismael,

    It is not masonry blogposts, but a photo gallery.

    Strange why is it working with ‘Element caption’ is selected to ‘display neither’ and NOT with ‘Element caption’ is ‘display title’

    So it is working, but only on one setting.

    #670153

    Hi,

    Strange why is it working with ‘Element caption’ is selected to ‘display neither’ and NOT with ‘Element caption’ is ‘display title’

    Please post the login details here so that we can check it. Could you please provide a screenshot of the data structure testing tool result?

    Best regards,
    Ismael

    #671082

    Hi, same issue here. Screenshot and url are in the private section.

    #672428

    Hi,

    Modify the masonry shortcode file if you want to add the author info in the masonry element. Please hire a freelance developer or contact codeable: http://kriesi.at/contact

    Best regards,
    Ismael

    #673393

    I don’t want to add the author info, that is not important because its just a masonry gallery. I would like to get rid off the errors in Google webmaster tools.
    I added the default masonry gallery from the Enfold theme and that is creating errors in Google webmaster tools. I don’t understand why i should hire a freelance developer to fix this.

    #674762

    Hi

    I agree with ‘Dutchman’ that it is strange to hire a developer to fix a problem.
    Enfold is so completely good written, only these Hentry mark-ups are missing.

    See my screenshot in private section.

    have a nice weekend

    roger

    #675196

    Hi,

    I don’t want to add the author info, that is not important because its just a masonry gallery. I would like to get rid off the errors in Google webmaster tools.

    You can see those errors because google is looking for the author and date info which is not included in the masonry template. You have to modify the config-templatebuilder > avia-shortcodes > av-helper-masonry.php file. Or use the “avf_masonry_loop_prepare” filter. Example here:

    https://kriesi.at/support/topic/display-the-post-category-above-the-title-in-masonry-view/

    Best regards,
    Ismael

    #675286

    Hi Ismael,

    Thanks, I will try to figure it out.

    #675290

    Question for understanding: Why is the author info not included in the masonry template?

    #675373

    overhere a freelance developer provided the solution for the same missing hentry items in Portfolio.

    Hi,

    We are very sorry for the delay. Look for this code around line 515:

    if(!empty($title_link))
    {
    $output .= ““.$title.”“;
    }
    else
    {
    $output .= “”.$title.””;
    }

    $output .= ‘</h3>
    </header>’;
    .. below, add this code:

    ob_start();
    the_author_posts_link();
    $author = ob_get_clean();

    $output .= ‘<span class=”blog-author minor-meta”>’.__(‘by’,’avia_framework’).” “;
    $output .= ‘<span class=”entry-author-link” >’;
    $output .= ‘<span class=”vcard author”><span class=”fn”>’;
    $output .= $author;
    $output .= ‘</span></span>’;
    $output .= ‘</span>’;
    $output .= ‘</span>’;
    Best regards,
    Ismael

    Anyone with a solution for the ‘missing Author and Updated’ in a Masonry gallery?

    #676731

    Hi!

    @Tobiy: One of the reasons was provided here: https://kriesi.at/support/topic/masonry-gallery-hentry/#post-664120

    @Dutchman: Thanks for the link. You can implement that in the av-helper-masonry.php file but we don’t recommend adding modifications in the core files of the theme and will only suggest it as a last resort.

    Best regards,
    Ismael

    #676844

    Hi Ismael,

    Ok i understand. I can not find the code in the av-helper-masonry.php to add the new code below it.

    #678564

    Hey!

    Instead of modifying the av-helper-masonry.php file, please try this in the functions.php file:

    add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_mod', 10 ,2);
    function avf_markup_helper_attributes_mod($attributes, $args) {
    	if($args['context'] == 'entry_title') $attributes['itemprop'] = 'text';
    	return $attributes;
    }
    

    Cheers!
    Ismael

    #861836

    Hi Ismael,

    i have also the problem with the hentry (Markup: microformats.org). Ther are noch attributes für “update” and “author”.

    I have copy your code on the answer befor in the function:
    But the i can see only “entry_title” in the code? I have to change “entry_titel” to “entry_update” and “entry_author” ?

    Sorry for my silly question, but i´m not fix in php, so i can only copy an paste?

    Thank for helping:

    This code i copy into thr function.php of my child.

    add_filter(‘avf_markup_helper_attributes’, ‘avf_markup_helper_attributes_mod’, 10 ,2);
    function avf_markup_helper_attributes_mod($attributes, $args) {
    if($args[‘context’] == ‘entry_title’) $attributes[‘itemprop’] = ‘text’;
    return $attributes;
    }

    #863112

    Hi,

    The properties “entry_update” and “entry_author” is not included in the masonry template by default so you have to modify the config-templatebuilder > avia-shortcode > av-helper-masonry.php file.

    Best regards,
    Ismael

    #863244

    Hi Ismael,

    thanks for your answer. Can you send me the code i have to change in the av-helber-masonry.php to get the hentry for update and author?
    I have running the newest Version from Enfold (3.8.4)

    Thanks.
    Alex

    #863875

    Hi,

    You can refer to the following link for the “author” schema code and implement it in the masonry template.

    // https://kriesi.at/support/topic/hentry-missing-in-portfolio-entries/#post-654588

    For the date, use this filter.

    // https://kriesi.at/support/topic/display-the-post-category-above-the-title-in-masonry-view/#post-660247

    Or just use this filter in the functions.php file which is a combination of the two.

    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_schema', 10, 2 );
    function avf_masonry_loop_prepare_mod_schema( $key, $entries )
    {
        $output = '';
        $separator = ' ';
        $date = get_the_date('d.m.y');
    
        ob_start();
        the_author();
        $author = ob_get_clean();
    
        $output .= '<span class="blog-author minor-meta">'.__('by','avia_framework').' ';
        $output .= '<span class="entry-author-link">';
        $output .= '<span class="vcard author"><span class="fn">';
        $output .= $author;
        $output .= '</span></span></span></span>';
        $output .= '<span itemprop="dateModified" style="display: none;">' . esc_html( $date ) . '</span>' . $separator;
    
        $key['text_before'] .= $output;
        return $key;
    }
    

    Best regards,
    Ismael

    #867491

    Hi Ismael,
    i try to put you combination Code in the funktion.php. But the date is not work für hentry.

    Pleas take a look in the private content.

    Best regards,
    alex

    #867967

    Hi,

    The “datemodfied” itemprop attribute was added on every items and I don’t see any errors in the data structure testing tool. Please remove the browser cache then check the page again.

    Best regards,
    Ismael

    #883786

    Hi Ismael,

    I wait some days, so google crawl it new.
    In the google search console i can find for hentry only “title” and “author”.

    Look at this screenshots:
    https://www.dropbox.com/s/lhezejpg4gsckma/Screenshot.png?dl=0

    Hentry Screenshot: There is no date!
    https://www.dropbox.com/s/coafgd3zhz8bqvz/hentry_screen.png?dl=0

    Can you help me?

    Thanks.
    Alex

    #884496

    Hi,

    Please try to remove the “display” property in the filter.

    $output .= '<span itemprop="dateModified" style="display: none;">' . esc_html( $date ) . '</span>' . $separator;
    

    Replace it with this code.

    $output .= '<span itemprop="dateModified">' . esc_html( $date ) . '</span>' . $separator;
    

    Best regards,
    Ismael

    #884555

    Hi Ismael,

    this changes the screen, by mouseover the pictuere. But there is no authordate in the hentry.
    https://www.dropbox.com/s/w5qa7chf21pyls2/date_mouseover.png
    https://www.dropbox.com/s/is93zssngx0tx8g/hentry_04-12-2017.png

    Best regard,
    Alex

    • This reply was modified 7 years ago by alex_0111.
    #885056

    Hi,

    Thank you for the update. Please try to add the “content” attribute to the same line.

    $output .= '<span itemprop="dateModified" content="'.esc_html( $date ).'">' . esc_html( $date ) . '</span>' . $separator;
    

    Best regards,
    Ismael

    #885131

    Hi, I do this, but i don´t get any date in the hentry. Do you have an other Idea?
    May you can take a look to my webside. LogIn you will see in the private area.

    Thanks.
    Alex

    /*
    * Add your own functions here. You can also copy some of the theme functions into this file.
    * WordPress will use those functions instead of the original functions then.
    */
    
    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_schema', 10, 2 );
    function avf_masonry_loop_prepare_mod_schema( $key, $entries )
    {
        $output = '';
        $separator = ' ';
        $content = get_the_time('c', $entries->ID);
    		$date = get_the_time('F j, Y', $entries->ID);
    
        ob_start();
        the_author();
        $author = ob_get_clean();
    
        $output .= '<span class="blog-author minor-meta">'.__('by','avia_framework').' ';
        $output .= '<span class="entry-author-link">';
        $output .= '<span class="vcard author"><span class="fn">';
        $output .= $author;
        $output .= '</span></span></span></span>';
    		$output .= '<meta itemprop="datePublished" content="'.esc_html( $content ).'">';
        $output .= '<span itemprop="dateModified" content="'.esc_html( $content ).'">' . esc_html( $date ) . '</span>' . $separator;
    
        $key['text_before'] .= $output;
        return $key;
    }
    
    
    #885946

    Hi,

    Did you disable the functions.php file?

    We adjusted the code in the functions.php file, specifically these parts.

    $content = get_the_time('c', $entries->ID);
    $date = get_the_time('F j, Y', $entries->ID);
    

    and..

    $output .= '<meta itemprop="datePublished" content="'.esc_html( $content ).'">';
     $output .= '<span itemprop="dateModified" content="'.esc_html( $content ).'">' . esc_html( $date ) . '</span>' . $separator;
    

    Please try it again.

    Based on: https://www.receptional.com/common-schema-problems-how-to-fix-them/

    Best regards,
    Ismael

    #888287

    Hi Ismael,
    I get a problem with the function.php, so i have to deactivated temporary.
    I gave this Job to an programer. Now it works for Hentry.

    May some other people can use them:

    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_schema', 10, 2 );
    function avf_masonry_loop_prepare_mod_schema( $key, $entries )
    {
        $output = '';
        $separator = ' ';
        $content = get_the_time('c', $entries->ID);
    	$date = get_the_time('F j, Y', $entries->ID);
    
        ob_start();
        the_author();
        $author = ob_get_clean();
    
        $output .= '<span class="entry-author-link" >';
        $output .= '<span class="vcard author"><span class="fn" style="visibility: hidden;">';
        $output .= $author;
    	$output .= '</span>' . '<br />' . $separator;
    	$output .= '<time style="visibility: hidden;" class="entry-date updated" datetime="'. esc_html( $content ) . '" pubdate>' . esc_html( $date ) . '</time>';
    
        $key['text_before'] .= $output;
        return $key;
    }

    Thanks for all.
    Alex

    #888330

    Hi,

    Alright. I’m glad that it’s working now. Thanks for sharing. :)

    Best regards,
    Ismael

Viewing 29 posts - 1 through 29 (of 29 total)
  • You must be logged in to reply to this topic.