Link slider to a page and not a post
-
I have a template and a want to link the slider to a excisting page and not a post the maker of the template has a FAQ about this thing:
you need to be comfortable with using wordpress custom fields. you need to create a new custom field, maybe call it “new_link” and then enter the link into this custom field. then you need to edit the template files.
in index php search for $link = get_permalink();
add a new line afterwards:
$new_link = get_post_meta($post->ID, “new_link”, true);
then search for get_permalink() arround line 47 and 52 and replace it with $new_link then search for $link at line 45 and replace it with $new_link as wellI changed the index.php and in the custom field of the page I made a new field called new-link with the www. link for the picture behind it. Can someone please help me because the maker is not responding to my questions, Thnx!
[Mod Note: Chunk of code removed. If you want to post large blocks of code, please use a pastebin.]
- The topic ‘Link slider to a page and not a post’ is closed to new replies.