Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_below_the_post () {
- $category = get_the_category();
- $category = $category[0]->category_nicename;
- if (!is_wp_error($category))
- {
- if ($category == 'student-stories')
- {
- if (is_page(42, 36, 54)) { // Enter any list of page/post ID's here
- echo '';
- } else {
- echo('<a class="postFootLink" href="' .site_url() .'/people/student-stories/">Return to ' .$category .'</a>');
- }
- } else if ($category == 'news' & $postID == '16') //this is where I am going wrong
- {
- echo('<a class="postFootLink" href="' .site_url() .'/news/">Return to ' .$category .'</a>');
- } else if ($category == 'research')
- {
- echo('<a class="postFootLink" href="' .site_url() .'/research/research-snippet/">Return to ' .$category .' snippets</a>');
- }
- }
- }
- add_action('thematic_belowpost', 'add_below_the_post');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement