Created
August 6, 2015 08:00
-
-
Save daviddegliame/fd0d29a807990b9ef735 to your computer and use it in GitHub Desktop.
Wordpress avec le framework genesis : modifier la meta title sur les pages et archives avec une pagination …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // in function.php of your theme or in mu-plugin file … | |
| //* SEO - fight duppplicate meta title on paginate section | |
| add_filter( 'wp_title', 'genesis_paginate_title', 35, 3 ); | |
| if (!function_exists('genesis_paginate_title')) | |
| { | |
| function genesis_paginate_title($title, $sep) | |
| { | |
| global $page, $paged; | |
| $sep = genesis_get_seo_option( 'doctitle_sep' ) ? genesis_get_seo_option( 'doctitle_sep' ) : '–'; | |
| if ( $paged >= 2 || $page >= 2 ) | |
| $title .= ' '.$sep.' '.sprintf( __( 'Page %s' ), max( $paged, $page) ); | |
| return $title; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment