Home / Admin / Add Another Meta Keyword to Each Post
Duplicate Snippet

Embed Snippet on Your Site

Add Another Meta Keyword to Each Post

This filter can be used to add another meta keyword to each post. You can replace 'anotherkeyword' with the desired keyword.

80+
Code Preview
php
<?php
add_filter( 'aioseo_keywords', 'aioseo_filter_keywords' );
function aioseo_filter_keywords( $keywords ) {
   if ( is_singular() ) {
      $keywords = explode( ',', $keywords );
      array_push( $keywords, 'anotherkeyword' );
      $keywords = implode( ',', $keywords );
   }
   return $keywords ;
}

Comments

Add a Comment