Advertisement
Deeproad

Wordpress description meta tag

May 10th, 2014
3,927
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. function set_meta_description() {
  2. if(is_home()) {
  3. echo get_bloginfo ( 'description' ) .". Allungo un po' il motto del Blog per far contento Google.";
  4. } else if(have_posts()&& is_single()OR is_page()) {
  5. while(have_posts()):the_post(); the_excerpt_rss(); endwhile;
  6. } else if(is_tag()) {
  7. echo "Argomenti relativi al tag ".ucfirst(single_tag_title("", FALSE));
  8. } else if(is_category()) {
  9. $cat_desc = category_description();
  10. if($cat_desc != '') {
  11. echo $cat_desc;
  12. } else {
  13. echo "Argomenti relativi alla categoria ".ucfirst(single_cat_title("", FALSE));
  14. }
  15. } else {
  16. echo get_bloginfo ( 'description' ) .". Allungo un po' il motto del Blog per far contento Google.";
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement