Changing link of the button

hi
i made a website in wordpress and i changed the template. there is two buttons in home page that says “download” and “view demo” and they both go to home page. i changed the images but i don’t know how to change the links since i don’t really know css. in the index file of the template there is two codes for buttons:

<div class="buttons">
                        <a href="<?php echo get_option('Ndegree_dlink'); ?>"><img class="" src="<?php bloginfo('template_url'); ?>/images/download.png" title="Click to download" alt="Download"/></a>
                        <a href="<?php echo get_option('Ndegree_demolink'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/view-demo.png" title="Click to view demo" alt="View Demo"/></a>
                    </div>

and there is a functions file that has a related code:

<td>Download Button Link:</td>
			<td><input type="text" name="Ndegree_dlink" id="Ndegree_dlink" size="50" value="<?php echo get_option('Ndegree_dlink'); ?>" />
		</td>
		</tr>
		<tr>
		<td>Demo Button Link:</td>
			<td><input type="text" name="Ndegree_demolink" id="Ndegree_demolink" size="50" value="<?php echo get_option('Ndegree_demolink'); ?>" />
		</td>

i know i need to somehow change the “ndegree_dlink” and “ndegree_demolink”. but i don’t really know how.
i replaced them with the url i wanted but they still go to home page. if you can tell me how to change one of them it would be enough.
and excuse my bad english.
tanks in advance

Hi,

Just to understand your problem correctly:
You have two buttons “download” and “view demo”.
Currently when you click them they go to the home page.
However, you want them to go somewhere else when they’re clicked.

Is that correct?

I’m sure we’ll be able to sort this out.

yes. that’s correct :slight_smile:

The location to which the link goes when it is clicked is specified by the href attribute of the anchor tag.
In the above code this attribute is generated by a call to the function “get_option(‘Ndegree_dlink’)” or “get_option(‘Ndegree_demolink’)”.
You can either find where this function is defined (in functions.php, maybe?) and change its return value, or you can change it by hand.
E.g.

<a href="http://mysite.com/whatever"><img class="" src="<?php bloginfo('template_url'); ?>/images/download.png" title="Click to download" alt="Download"/></a>

If you do it this way, you can use either the complete path (as in the example), the path from the server root (/download) or a relative path (…/download)

By the way, it might be better to change the return value of the function if you use it in more than one place.

tank you pullo, it worked perfectly.
as i said in the first post, in the functions.php there is 2 codes that seems related to it (second code in first post). but i couldn’t find any return value to change.
i use them only in home page so i changed it manually and it worked.
you are the best :slight_smile:

Happy to help :slight_smile: