dimaslanjaka

Powerful Meta Keyword Wordpress

Mar 10th, 2017
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. //Get title > remove symbolic character > add comma before space > set to Powerful Meta Keyword (Wordpress Official By L3n4r0x)
  2.  
  3. <meta name="keywords" content="<?php $string = get_the_title(); //Mengambil Judul Post
  4. $f = preg_replace('/[^\p{L}\p{N}\s]/u', '', $string); //Menghapus Symbol dan huruf Spesial
  5. $c = preg_replace('#\s+#', ', ',trim($f)); //Menambah koma sebelum spasi
  6. echo $c; //Menampilkan Hasil ?>">
Advertisement
Add Comment
Please, Sign In to add comment