Posted By

xma on 07/23/13


Tagged

wordpress


Versions (?)

worpdress page title


 / Published in: PHP
 

wordpress custom title in post with custom field

  1. <?php if (function_exists('is_tag') && is_tag()) {
  2. single_tag_title('Archivio TAG &quot;'); echo '&quot; - ';
  3. } elseif (is_archive()) {
  4. wp_title(''); echo ' Archivio - ';
  5. } elseif (is_search()) {
  6. echo 'Ricerca &quot;'.wp_specialchars($s).'&quot; - ';
  7. } elseif (!(is_404()) && (is_single()) ) {
  8.  
  9. $titolocustom = get_post_custom_values("titolo_pagina");
  10. if (isset($titolocustom[0])) {
  11. echo $titolocustom[0];
  12. } else {
  13. single_post_title();
  14. }
  15. }elseif (is_page()){
  16.  
  17. }elseif (is_404()) {
  18. echo 'Not Found - ';
  19. }
  20. if (is_home() || is_front_page()) {
  21. bloginfo('name');
  22. }
  23. if ($paged > 1) {
  24. echo ' - pagina '. $paged;
  25. } ?>

Report this snippet  

You need to login to post a comment.