Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Problems with Rich Snippets for Google (http://forum.bytesforall.com/showthread.php?t=21408)

strok Jan 19, 2014 11:50 AM

Problems with Rich Snippets for Google
 
I use the Montezuma Theme with the newest updates.

I try to correct this according several hints in the www, but it doesnīt work.

I add in the single.php "the entry title"

PHP Code:
PHP Code:

<h1>
                <a href="<?php the_permalink(); ?>" title entry-title ="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
                <?php bfa_comments_number(); ?>
           
            </h1>

and in the postformat.php I added the author card:

PHP Code:
PHP Code:

<h2>
        <span class="post-format"></span>
        <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
        <?php bfa_comments_popup_link'0''1''%' ); ?>
      <span class="vcard author">    
 <span class="fn"><?php the_author_posts_link(); ?></span>
</span>
      
    </h2>

and at the last I added the "date updated" in the postformat.php

PHP Code:
PHP Code:

<div class="post-bodycopy cf">
    
        <div class="post-date date updated">        
            <p class="post-month"><?php the_time'M' ); ?></p>
            <p class="post-day"><?php the_time'j' ); ?></p>
            <p class="post-year"><?php the_time'Y' ); ?></p>    
        </div>

Iīm sorry Iīm not an expert in code.

Please help me.

CrouchingBruin Jan 19, 2014 10:02 PM

What were you trying to accomplish in setting an entry-title attribute in the anchor tag in single.php? entry-title is not a valid attribute for the anchor tag.

Nothing you put inside a tag will appear on the web page. For example, in postformat.php, you did this:
Code:

<div class="post-bodycopy cf">
   
        <div class="post-date date updated">       
            <p class="post-month"><?php the_time( 'M' ); ?></p>
            <p class="post-day"><?php the_time( 'j' ); ?></p>
            <p class="post-year"><?php the_time( 'Y' ); ?></p>   
        </div>

But the string date updated is not going to appear because it's within the div tag. If you want it to show up, you should put it outside, like this:
Code:

<div class="post-bodycopy cf">
   
        <div class="post-date">Date updated:
            <p class="post-month"><?php the_time( 'M' ); ?></p>
            <p class="post-day"><?php the_time( 'j' ); ?></p>
            <p class="post-year"><?php the_time( 'Y' ); ?></p>   
        </div>

Do you have an address that you can point us to so we can look at your site?

CrouchingBruin Jan 19, 2014 10:28 PM

OK, I just read your other thread in the Atahualpa forum and now I understand what you are trying to do. According to this article, you can fix it this way:

In single.php, edit it so it looks like this, instead:
Code:

        <h1 class="entry-title">
                <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
                <?php bfa_comments_number(); ?>
        </h1>

For postformat.php, everything that you've done looks OK, but I would also change this:
Code:

        <h2 class="entry-title">
                <span class="post-format"></span>
                <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
                <?php bfa_comments_popup_link( '0', '1', '%' ); ?>
        </h2>

Can you post a link to your site so we can take a look?

strok Jan 29, 2014 10:02 AM

@CrouchingBruin

Thanks a lot for your help I tried yesterday and now I didnīt get any errors in the structure tool.

Just only waiting till google update the search result that I can see my profil picture.

BTW my Backpacker-Blog but in german.


All times are GMT -6. The time now is 08:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.