Mam problem z wtyczką, wcześniej mi działało nadpisywanie tagu TITLE, obecnie już nie. kod źródłowy funkcji:
  1. function twentytwelve_wp_title1234( $title, $sep ) {
  2. global $numpages;
  3.  
  4. global $page;
  5.  
  6. if( ( $numpages > 1 ) && ( ! is_home() ) )
  7. {
  8. $my_postid = get_the_ID();
  9. $content_post = get_post($my_postid);
  10. $content = $content_post->post_content;
  11.  
  12. if (preg_match_all('#<h2 id="(.*)">(.*)</h2>#i', $content, $matches))
  13. {
  14. foreach ($matches[1] as $key=>$val) $$val = $matches[2][$key];
  15. }
  16.  
  17. for( $i = 1; $i < $numpages; $i++ )
  18. {
  19. if($i==$page-1) return ${'rozdzial_'.$i} . ' - ' . get_the_title( $my_postid ) . ' - Tweaks.pl';
  20. }
  21.  
  22. return get_the_title( $my_postid ) . ' - Tweaks.pl';
  23. }
  24. else
  25. {
  26. return $title;
  27. }
  28. }
  29.  
  30. add_filter( 'wpseo_title', 'twentytwelve_wp_title1234', 10000, 2 );