March 27, 2016 at 7:16 am #88332
Hi, Sakin – a question for you. Google uses the author/update fields in deciding how high to rank pages and posts in their search. BUT these two fields are missing in the template for pages. Can I get code (and really basic directions for where to insert it) to add this info to my pages?
This is really important for me as I use my pages as category home pages for my site. They are updated fairly often and have links to all my posts, so I need to have them showing well in searches!
Otherwise things are working really smoothly. I still really like the template.
explorationvacation.netMarch 27, 2016 at 8:04 am #88338PratikKeymaster
Do you want page author to be displayed in single page, say, like in http://explorationvacation.net/about/ ? If this is the case, then you just need to add a file content-page.php in your child theme and put the contents in this link: http://pastebin.com/25i8fhbV in that file. Since you are already using a child theme, I am skipping the child theme creation part.
Let me know if its something else and I will help you further.
PratikMarch 28, 2016 at 5:35 am #88382
Crap. I wrote a detailed response to this – with examples — that apparently vanished into digital nothingness.
I don’t know that that solves it. It’s a h-entry issue – the author and update hentry fields are missing for posts. I don’t need them to show up on the page for human viewers, but they need to be coded so google sees them.March 28, 2016 at 10:28 am #88396PratikKeymaster
I think @Sakin can answer this. I will tag him and let him know.
PratikMarch 28, 2016 at 12:37 pm #88406
@thetravelgal: In which page are you looking for. I just tested your homepage with Structured Data Testing Tool https://developers.google.com/structured-data/testing-tool/ and it’s showing fine. You can validate it yourself there.March 28, 2016 at 7:25 pm #88425
PAGES are the problem.
http://explorationvacation.net/destinations/usa-2/minnesota/exploring-minnesota-lake-superiors-north-shore/March 28, 2016 at 10:16 pm #88442
@thetravelgal: Those are pages and which doesn’t need author and date. Author and date is only for WordPress posts and not pages. Pages are static sections for static pages like About us, contact us and so on.
So, even if you test your page http://explorationvacation.net/destinations/ in Structured Data Testing Tool https://developers.google.com/structured-data/testing-tool/, you will not see any issue. As Google also knows this is page and not post to have date and author.March 28, 2016 at 10:24 pm #88443
Back to my original request — I WANT THIS INFORMATION ON PAGES!!! How do I embed it?
My pages are NOT static and the update info is important!
Do I have to leave wordpress to have pages that include this info?March 29, 2016 at 9:27 am #88463
@cindy: If your page are not static then why don’t you create post. For dynamic it is recommended to create post. That’s the WordPress logic.
But if you insist of creating Page and add that posted on and date then you need to create child theme. For child theme, refer to https://catchthemes.com/blog/create-child-theme-wordpress/ and then copy
content-page.phpin your child theme. Then add the following code:
<?php catchresponsive_entry_meta(); ?>
before the following code:
</header><!-- .entry-header -->
Note: this will add code like this in your page:
<p class="entry-meta"><span class="posted-on"><span class="screen-reader-text">Posted on</span><a rel="bookmark" href="Your page URL"><time datetime="2007-09-04T10:48:10+00:00" class="entry-date published">September 4, 2007</time><time datetime="2015-05-11T16:44:16+00:00" class="updated">May 11, 2015</time></a></span><span class="byline"><span class="author vcard"><span class="screen-reader-text">Author</span><a href="Your Author URL" class="url fn n">CatchThemes</a></span></span><span class="edit-link"><a href="Your edit page URL" class="post-edit-link">Edit</a></span></p>April 2, 2016 at 6:45 am #88678
Thanks, Sakin. I appreciate the help.
I think I did that right. . . I copied the file in the main theme to the child then added the line of code. I created a new page to test it, but don’t see the coding you have, nor is it showing structured data in google. I thought the change would be immediate. . . is there be a delay or did I do something wrong?
- The topic ‘author and update date needed for PAGES’ is closed to new replies.