WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Tag/Category Broken in Page Titles (66 posts)

  1. escapingabroad
    Member
    Posted 1 year ago #

    Hi,

    Just activated the new version and have noticed that the "%%tag%%" and "%%category%%" tags are not working and are printing into the page titles incorrectly. All other title tags seem to be working.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. mariansarau
    Member
    Posted 1 year ago #

    Same problem :(

  3. Cordeiro
    Member
    Posted 1 year ago #

    Version 1.2.8.6, is not displaying the name of the author on the title page. Appears "%% name%%" instead of the name.

  4. escapingabroad
    Member
    Posted 1 year ago #

    Guess I'm not the only one - hope this bug is fixed soon!

  5. uggur
    Member
    Posted 1 year ago #

    Same problem :/

  6. manuelpegoraro
    Member
    Posted 1 year ago #

    Same problem (I suppose) for events category

    http://www.marcatrevigiana.it/eventi/categoria/mostre

  7. MR-Mostafa
    Member
    Posted 1 year ago #

    Same problem :-? :(

  8. Julian
    Member
    Posted 1 year ago #

    Same here.

  9. uggur
    Member
    Posted 1 year ago #

    I guess open wpseo-functions.php in inc folder and find: (line 158)

    '%%pagenumber%%' => $pagenum,

    Add below:

    '%%category%%' => wpseo_get_terms( $r->ID, 'category' ),

  10. Julian
    Member
    Posted 1 year ago #

    uggur, thanks, but it doesn't work for me.

  11. uggur
    Member
    Posted 1 year ago #

    Julian,

    Maybe you should find : (About these lines 153 to 186)

    $replacements = array(
    '%%date%%' => $date,
    '%%searchphrase%%' => esc_html( get_query_var( 's' ) ),
    '%%page%%' => ( $max_num_pages > 1 && $pagenum > 1 ) ? sprintf( $sep . ' ' . __( 'Page %d of %d', 'wordpress-seo' ), $pagenum, $max_num_pages ) : '',
    '%%pagetotal%%' => $max_num_pages,
    '%%pagenumber%%' => $pagenum,
    '%%category%%' => wpseo_get_terms( $r->ID, 'category' ),
    );

    if ( isset( $r->post_type ) ) {
    $replacements = array_merge( $replacements, array(
    '%%caption%%' => $r->post_excerpt,

    '%%category%%' => wpseo_get_terms( $r->ID, 'category' ),
    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : utf8_encode( substr( strip_shortcodes( strip_tags( utf8_decode( $r->post_content ) ) ), 0, 155 ) ),
    '%%excerpt_only%%' => strip_tags( $r->post_excerpt ),
    '%%focuskw%%' => wpseo_get_value( 'focuskw', $r->ID ),
    '%%id%%' => $r->ID,
    '%%modified%%' => mysql2date( get_option( 'date_format' ), $r->post_modified ),
    '%%name%%' => get_the_author_meta( 'display_name', !empty( $r->post_author ) ? $r->post_author : get_query_var( 'author' ) ),
    '%%tag%%' => wpseo_get_terms( $r->ID, 'post_tag' ),
    '%%title%%' => stripslashes( $r->post_title ),
    '%%userid%%' => !empty( $r->post_author ) ? $r->post_author : get_query_var( 'author' ),
    ) );
    }

    if ( !empty( $r->taxonomy ) ) {
    $replacements = array_merge( $replacements, array(
    '%%category_description%%' => trim( strip_tags( get_term_field( 'description', $r->term_id, $r->taxonomy ) ) ),
    '%%tag_description%%' => trim( strip_tags( get_term_field( 'description', $r->term_id, $r->taxonomy ) ) ),
    '%%term_description%%' => trim( strip_tags( get_term_field( 'description', $r->term_id, $r->taxonomy ) ) ),
    '%%term_title%%' => $r->name,
    ) );
    }

    And replace with this:

    $replacements = array(
    '%%date%%' => $date,
    '%%title%%' => stripslashes( $r->post_title ),
    '%%excerpt%%' => ( !empty( $r->post_excerpt ) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155 ),
    '%%excerpt_only%%' => strip_tags( $r->post_excerpt ),
    '%%category%%' => wpseo_get_terms( $r->ID, 'category' ),
    '%%category_description%%' => !empty( $r->taxonomy ) ? trim( strip_tags( get_term_field( 'description', $r->term_id, $r->taxonomy ) ) ) : '',
    '%%tag_description%%' => !empty( $r->taxonomy ) ? trim( strip_tags( get_term_field( 'description', $r->term_id, $r->taxonomy ) ) ) : '',
    '%%term_description%%' => !empty( $r->taxonomy ) ? trim( strip_tags( get_term_field( 'description', $r->term_id, $r->taxonomy ) ) ) : '',
    '%%term_title%%' => $r->name,
    '%%focuskw%%' => wpseo_get_value( 'focuskw', $r->ID ),
    '%%tag%%' => wpseo_get_terms( $r->ID, 'post_tag' ),
    '%%modified%%' => mysql2date( get_option( 'date_format' ), $r->post_modified ),
    '%%id%%' => $r->ID,
    '%%name%%' => get_the_author_meta( 'display_name', !empty( $r->post_author ) ? $r->post_author : get_query_var( 'author' ) ),
    '%%userid%%' => !empty( $r->post_author ) ? $r->post_author : get_query_var( 'author' ),
    '%%searchphrase%%' => esc_html( get_query_var( 's' ) ),
    '%%page%%' => ( $max_num_pages > 1 && $pagenum > 1 ) ? sprintf( $sep . ' ' . __( 'Page %d of %d', 'wordpress-seo' ), $pagenum, $max_num_pages ) : '',
    '%%pagetotal%%' => $max_num_pages,
    '%%pagenumber%%' => $pagenum,
    '%%caption%%' => $r->post_excerpt,
    );

  12. underclass
    Member
    Posted 1 year ago #

    @ugger

    I also had to copy from line 173:
    '%%tag%%' => wpseo_get_terms( $r->ID, 'post_tag' ),

    and paste it under:
    '%%category%%' => wpseo_get_terms( $r->ID, 'category' ),

  13. uggur
    Member
    Posted 1 year ago #

    It should be fix it?

  14. underclass
    Member
    Posted 1 year ago #

    @ugger

    Yes, I had to add the tag line to fix the tags error.

  15. manuelpegoraro
    Member
    Posted 1 year ago #

    @uggur

    With Events calendar does not work!
    Can you help me?

  16. manuelpegoraro
    Member
    Posted 1 year ago #

    Where can I download the previous version of the plugin?

  17. mariansarau
    Member
    Posted 1 year ago #

    The previous version of the plugin: http://goo.gl/sabgF
    Just overwrite "wordpress-seo" folder from wp-content/plugins

  18. galbaras
    Member
    Posted 1 year ago #

    Thank you, @uggur and @mariansarau. I just hope @joostdevalk will fix this real quick

  19. brasofilo
    Member
    Posted 1 year ago #

    I'm having the same issue.
    Swapped to TwentyEleven and disabled all plugins, and nope.

    It's only happening in 1 site out of 12.

    Reverting back to 1.2.8.5 solves the problem.

    This is the official repository for previous versions:
    http://wordpress.org/extend/plugins/wordpress-seo/developers/

  20. wellbeingtips
    Member
    Posted 1 year ago #

    I have same but only with %%category%%,all other seems ok.
    I will wait for Joost today and if nothing happen Im gonna try development version, roll back to previous or use some tips above from this tread.

  21. mullkv
    Member
    Posted 1 year ago #

    Same issue here - all the category titles are just coming up as the template string.

  22. Beee
    Member
    Posted 1 year ago #

    I thought I missed a setting or so, but luckily I'm not alone.

  23. kitcorsa
    Member
    Posted 1 year ago #

    i getting the same problem with %%category%% description not working either as it seems to be pulling in the catogory name instead of description......

  24. ricardofpraimundo
    Member
    Posted 1 year ago #

    In SEO -> Titles & Meta -> Taxonomies

    Replace %%title%% to %%term_title%%

    Enjoy.

  25. EmanueleT
    Member
    Posted 1 year ago #

    hi, i have the same problem of kitcorsa. my meta descriptions are messed up. i tried to ask for help but without any result; i hope someboy here can tell me what to do.

    if you wanna take a look of my head of header.php, here it is:

    <head>
    	<title><?php wp_title(''); ?></title>
    	<meta name="description" content="<?php wp_title(); echo ' | '; bloginfo( 'description' ); ?>" />
    	<meta charset="<?php bloginfo( 'charset' ); ?>" />
    	<link rel="profile" href="http://gmpg.org/xfn/11" />
      	<link rel="icon" href="<?php bloginfo( 'template_url' ); ?>/favicon.ico" type="image/x-icon" />
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'rss2_url' ); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="<?php bloginfo( 'name' ); ?>" href="<?php bloginfo( 'atom_url' ); ?>" />
    	<?php /* The HTML5 Shim is required for older browsers, mainly older versions IE */ ?>
      	<!--[if lt IE 8]>
            <div style=' clear: both; text-align:center; position: relative;'>
                <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" alt="" /></a>
            </div>
      <![endif]-->
      <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/normalize.css" />
      <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
      <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/prettyPhoto.css" />
      <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/css/grid.css" />
    	<?php
    		/* We add some JavaScript to pages with the comment form
    		 * to support sites with threaded comments (when in use).
    		 */
    		if ( is_singular() && get_option( 'thread_comments' ) )
    			wp_enqueue_script( 'comment-reply' );
    
    	?>
      	<!--[if lt IE 9]>
            <style type="text/css">
    			.button,
    			.dropcap,
    			.featured-thumbnail,
    			.featured-thumbnail img,
                .wp-pagenavi a,
                .wp-pagenavi span,
                li.comment .avatar,
                #top-search #submit,
    			.wpcf7-form input[type="submit"],
    			.wpcf7-form input[type="reset"],
                .tags-cloud a,
    			.tagcloud a,
                .popular-posts li .post-thumb,
                .popular-posts li .post-thumb .thumbnail,
    			#gallery .portfolio li a.image-wrap,
    			#gallery .portfolio li a.image-wrap img,
    			.text-icon {
    			  behavior:url(<?php bloginfo('stylesheet_directory'); ?>/PIE.php)
    			}
            </style>
     	 <![endif]-->
    
      	<script type="text/javascript">
      	// initialise plugins
    		jQuery(function(){
    			// main navigation init
    			jQuery('ul.sf-menu').superfish({
    				delay:       <?php echo of_get_option('sf_delay'); ?>, 		// one second delay on mouseout
    				animation:   {opacity:'<?php echo of_get_option('sf_f_animation'); ?>'<?php if (of_get_option('sf_sl_animation')=='show') { ?>,height:'<?php echo of_get_option('sf_sl_animation'); ?>'<?php } ?>}, // fade-in and slide-down animation
    				speed:       '<?php echo of_get_option('sf_speed'); ?>',  // faster animation speed
    				autoArrows:  <?php echo of_get_option('sf_arrows'); ?>,   // generation of arrow mark-up (for submenu)
    				dropShadows: <?php echo of_get_option('sf_shadows'); ?>   // drop shadows (for submenu)
    			});
    
    			// prettyphoto init
    			jQuery("a[rel^='prettyPhoto']").prettyPhoto({
    				animation_speed:'normal',
    				slideshow:5000,
    				autoplay_slideshow: false,
    				overlay_gallery: true
    			});
    
    		});
    
    		// Init for audiojs
    		audiojs.events.ready(function() {
    			var as = audiojs.createAll();
    		});
    		$(function(){
    			$('.after-content-area .latestpost li:nth-child(3n), .recent-posts.general li:nth-child(3n), .recent-posts.services li:nth-child(2n), .recent-posts.team li:nth-child(2n), .recent-posts.clients li:nth-child(5n)').addClass('nomargin');
    			$('.recent-posts.team li:nth-child(4n), .recent-posts.team li:nth-child(4n-1)').addClass('img-right');
    			$('#widget-header .social-networks li a').append('<span class="line-bot"></span>');
    			if ($.browser.opera || $.browser.msie) {
    				$('#widget-header .social-networks li a').hover(function(){
    						$(this).find('.line-bot').stop().animate({width:'100%', left:0})
    					}, function(){
    						$(this).find('.line-bot').stop().animate({width:0, left:'50%'})
    				});
    
    			} else {
    				$('#widget-header .social-networks li a').hover(function(){
    						$(this).find('.line-bot').stop().animate({width:'100%', left:'0%'})
    					}, function(){
    						$(this).find('.line-bot').stop().animate({width:'0%', left:'50%'})
    				});
    			}
    		});
      </script>
    
      <script type="text/javascript">
    		jQuery(window).load(function() {
    
    		});
    	</script>
      <!-- Custom CSS -->
    	<?php if(of_get_option('custom_css') != ''){?>
      <style type="text/css">
      	<?php echo of_get_option('custom_css' ) ?>
      </style>
      <?php }?>
    
      <style type="text/css">
    
    		<?php $background = of_get_option('body_background');
    			if ($background != '') {
    				if ($background['image'] != '') {
    					echo 'body { background-image:url('.$background['image']. '); background-repeat:'.$background['repeat'].'; background-position:'.$background['position'].';  background-attachment:'.$background['attachment'].'; }';
    				}
    				if($background['color'] != '') {
    					echo 'body { background-color:'.$background['color']. '}';
    				}
    			};
    		?>
    
    		<?php $header_styling = of_get_option('header_color');
    			if($header_styling != '') {
    				echo '#header {background-color:'.$header_styling.'}';
    			}
    		?>
    
    		<?php $links_styling = of_get_option('links_color');
    			if($links_styling) {
    				echo 'a{color:'.$links_styling.'}';
    				echo '.button {background:'.$links_styling.'}';
    			}
    		?>
    
    		<?php $body_typography = of_get_option('body_typography');
    			if($body_typography) {
    				echo 'body {font-family:'.$body_typography['face'].'; color:'.$body_typography['color'].'}';
    				echo '#main {font-size:'.$body_typography['size'].'; font-style:'.$body_typography['style'].';}';
    			}
    		?>
      </style>
    	<?php
    		/* Always have wp_head() just before the closing </head>
    		 * tag of your theme, or you will break many plugins, which
    		 * generally use this hook to add elements to <head> such
    		 * as styles, scripts, and meta tags.
    		 */
    		wp_head();
    	?>
    </head>

    please guys give me some soultions ...

    thanks in advance!

  26. andyleery
    Member
    Posted 1 year ago #

    Got the same problem with the "tag" replacement. Is there an email to ask Yoast directly or hint him this thread?

  27. brasofilo
    Member
    Posted 1 year ago #

    EmanueleT & andyleery - if you read the thread, there are a couple of solutions...

  28. EmanueleT
    Member
    Posted 1 year ago #

    i read it, but i didnt get it so much ,, can u give me an advice please

  29. brasofilo
    Member
    Posted 1 year ago #

  30. wellbeingtips
    Member
    Posted 1 year ago #

    I wrote to the developer but no answer yet...
    As brasofio said there are some solutions or to wait till Joost fix and update the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.