• Hi, I have 2 button images but I can’t figure out the code to get them to work. Below are the 2 functions I need the code for.

    1.PDF Button
    When this button is clicked the .pdf will start to download.
    What code would I use for this?

    2.Contact Button
    Clicking this button will take the user to the contact page.
    What code would I use for this?

    This is the button code: Please show me how I would add this code to the functions above.

    <img src=”https://url/wp-content/uploads/2011/06/view_more_main.png&#8221; alt=”” title=”view_more_main” width=”100″ height=”29″ class=”alignnone size-full wp-image-777″ />

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Paint Guy

    (@paint-guy)

    If someone could help I would appreciate it. ??

    1.PDF Button
    When this button is clicked the .pdf will start to download.
    What code would I use for this?

    Most users install pdf helper/viewer extensions in their browsers that automatically open the .pdf rather than download it. You have the choice of allowing your viewers to do that, then they can choose to save a copy locally if they wish, or you can place your .pdf file in a .zip directory, which in most cases will force a “Save As” dialog when the download link is clicked.

    Either way, the code will look like this for both of your questions:

    A file download:

    <a href="https://www.yoursite.com/path_to_the_file/filename.extension"><img src="https://www.yoursite.com/path_to_image/imagename.extension"></a>

    …or a contact form or page on your site:

    <a href="https://www.yoursite.com/path_to_contact_pagename.php"><img src="https://www.yoursite.com/path_to_image/imagename.extension"></a>

    You can also simply select where you want your image to link to at the time you place it in a post or page by using the “links URL” dialog at the bottom of the media up-loader where it says “Enter a link URL or click above for presets.”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need Code for 2 Separate Button Functions’ is closed to new replies.