-
-
Save djvdorp/01df2442cd72152ccc8b05e66ffd0e85 to your computer and use it in GitHub Desktop.
Revisions
-
amboutwe revised this gist
Nov 20, 2017 . No changes.There are no files selected for viewing
-
amboutwe revised this gist
Aug 25, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ********* * MULTIPLE ITEMS * Multiple of the same type can use an array. Example: is_single( array( 123456, 1234567, 12345678 ) ) * Multiple of different types can repeat the if statement */ -
amboutwe revised this gist
Aug 25, 2017 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,10 +3,17 @@ /* Remove Yoast SEO Title From An Individual Post/Page/CPT * Credit: Yoast Team * Last Tested: Aug 11 2017 using Yoast SEO 5.2 on WordPress 4.8.1 ********* * DIFFERENT POST TYPES * Post: Change 123456 to the post ID * Page: Change is_single to is_page and 123456 to the page ID * Custom Post Type: Change is_single to is_singular and 123456 to the 'post_type_slug' Example: is_singular( 'cpt_slug' ) ********* * MULTIPLE ITEMS * Multiple of the same type can use an array. Example: is_single( array( 123456, 1234567, 12345678 ) ); * Multiple of different types can repeat the if statement */ add_filter( 'wpseo_title', 'remove_one_wpseo_title' ); @@ -15,4 +22,5 @@ function remove_one_wpseo_title() { if ( is_single ( 123456 ) ) { return false; } /* Use a second if statement here when needed */ } -
amboutwe created this gist
Aug 12, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <?php /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ /* Remove Yoast SEO Title From All Pages * Credit: Yoast Team * Last Tested: Aug 11 2017 using Yoast SEO 5.2 on WordPress 4.8.1 */ add_filter( 'wpseo_title', '__return_false' ); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ <?php /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ /* Remove Yoast SEO Title From An Individual Post/Page/CPT * Credit: Yoast Team * Last Tested: Aug 11 2017 using Yoast SEO 5.2 on WordPress 4.8.1 * Post: Change 123456 to the post ID * Page: Change is_single to is_page and 123456 to the page ID * Custom Post Type: Change is_single to is_singular and 123456 to the 'post_type_slug' Example: is_singular( 'cpt_slug' ) */ add_filter( 'wpseo_title', 'remove_one_wpseo_title' ); function remove_one_wpseo_title() { if ( is_single ( 123456 ) ) { return false; } }