• Using Cutomizr theme with Yoast plugin I have successfully established a link to Google plus for authorship. However, in Googles Webmaster tools I have these errors for the

    hatom-feed:
    Error: Missing required field “updated”.
    Error: Missing required hCard “author”.

    I have found a number of sites with the same solution for this problem which require editing the single.php file. However, I can’t find a single.php anywhere in my server directories.

    Has anybody found a fix for this problem? I’m quite happy to edit code if I know where to look and how to fix it.

Viewing 15 replies - 1 through 15 (of 18 total)
  • I know for sure that the “updated” issue is being fixed in the next release. I don’t know about the author hcard. I’ll flag for nikeo’s attention.

    Thread Starter Colin Martin

    (@colin-martin)

    Thanks for the response.

    The author can be fixed by replacing : <?php the_author(); ?>,
    with; <span class=”vcard author”><span class=”fn”><?php the_author(); ?></span></span>

    I’m more than happy to edit this myself but can’t find the file <?php the_author(); ?> is kept in. Where can I find this?

    Colin, don’t know if this is exactly what you want.. but you can filter “the_autor” in order to add those spans, adding this to your child theme functions.php :

    add_filter( 'the_author', 'my_the_author', 10, 1 );
    function my_the_author($author){
        if ( ! $author )
            return null;
        return sprintf('<span class=”vcard author”><span class=”fn”>%1$s</span></span>', $author);
    }
    Thread Starter Colin Martin

    (@colin-martin)

    Looked in functions.php and can’t work out where to put this. I understand the PHP but not enough about WordPress to place this. I’ve tried it in a few places but only resulted in hanging WordPress and having to restore back up files. So I’ll leave it to you guys to fix.

    Colin, don’t know where you put that code, I said in

    your child theme functions.php

    https://www.themesandco.com/customizr/how-to-customize-customizr-wordpress-theme/

    Thread Starter Colin Martin

    (@colin-martin)

    Because I’m trying to do this in a hurry I was looking at the main functions.php.

    I’ve read the help file and installed child-themify plug in. However, I don’t have links in appearance-> themes shown in the help file and the option create a child theme. I have customise, widgets, menus and about customiser as buttons instead. The child-themify plugin files are on my server.

    Thanks for the help but I’m spending too much time trying to fix this. I used WordPress to be a quick and easy website creator while I got on with coding our main product. It’ll have to let it run as it is.

    I forgot to include a link earlier – Diary 8

    Hi Colin.
    Don’t know about child-themify, is it active and you don’t see the link “Create a child theme” in appearance->themes->Customizr?

    Thread Starter Colin Martin

    (@colin-martin)

    Yes it’s activated I just don’t have the create a child theme option in appearance->themes->Customizr. I have buttons rather than links as shown in the help file.

    Just downloaded and activated that plug-in.
    Go in Appearence -> Themes. Roll over “Customizr” and click on “Theme Details”, then you’ll see the button “Create a child theme”.

    Hope this helps.

    Would a similar version of the same code be able to fix the common title and date errors as well?

    It seems to be something all users of customizr will have to deal with if they use analytics

    @jazzatomo could you open a new topic and explain this issue there?

    Thread Starter Colin Martin

    (@colin-martin)

    I’ve given up on trying to fix this because I have no way of creating a child theme and easy to use WordPress is turning into a project.

    Doing this:

    Go in Appearence -> Themes. Roll over “Customizr” and click on “Theme Details”, then you’ll see the button “Create a child theme”.

    I can’t find anything about creating a child theme. As mentioned before I have buttons rather than the links shown in the help file. Moving my pointer over every inch of the screen results in nothing popping up.

    If somebody starts a new topic can you post the link here? Thanks.

    Hi Colin, sorry I was wrong to read.
    If you don’t have that button that plug-in isn’t working.
    You can try if the same happens also in theme details of a standard theme like twentyfourteen…

    About “updated”, according to the changelog, is fixed in customizr 3.1.7 .

    * fixed : (html) Google Structured Data : addition of the “updated” class in entry-date

    Just to know, is there a reason for not using this child theme?
    https://www.themesandco.com/extension/customizr-child-theme/

    d4z_c0nf, I hate to say but the code as it looks here will never fix any error for anybody, unless it is re-written using correct ” and removing other extra characters like (%1$s).

    add_filter( 'the_author', 'my_the_author', 10, 1 );
    function my_the_author($author){
        if ( ! $author )
            return null;
        return sprintf('<span class="vcard author"><span class="fn"></span></span>', $author);
        }

    anyway, in this case all it does is just replaces the author nickname in the post title to the sprintf parameters as plain text)

    You are correct about the " instead of .

    However, if you remove the %1$s but leave the ,$author as you have above, there will be no author substituted and the whole point of adding the filter in the first place is lost.

    Anyway, this is an old post. Customizr has this in its core code.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Missing Author and Updated in Google Webmaster tools’ is closed to new replies.