Advertisement
Guest User

Untitled

a guest
Mar 20th, 2012
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. function add_below_the_post () {
  2.  
  3.     $category = get_the_category();
  4.     $category = $category[0]->category_nicename;
  5.  
  6.     if (!is_wp_error($category))
  7.     {
  8.         if ($category == 'student-stories')
  9.         {
  10.             if (is_page(42, 36, 54)) {  // Enter any list of page/post ID's here
  11.                 echo '';
  12.             } else {
  13.                 echo('<a class="postFootLink" href="' .site_url() .'/people/student-stories/">Return to ' .$category .'</a>');
  14.             }
  15.                
  16.         } else if ($category == 'news' & $postID == '16') //this is where I am going wrong
  17.         {
  18.             echo('<a class="postFootLink" href="' .site_url() .'/news/">Return to ' .$category .'</a>');
  19.  
  20.         } else if ($category == 'research')
  21.         {
  22.             echo('<a class="postFootLink" href="' .site_url() .'/research/research-snippet/">Return to ' .$category .' snippets</a>');
  23.         }
  24.  
  25.     }
  26. }
  27.  
  28. add_action('thematic_belowpost', 'add_below_the_post');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement