4 Replies - 3046 Views - Last Post: 13 August 2011 - 01:10 AM

#1 teahou  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 223
  • Joined: 01-April 11

How to added a linked image to a wordpress page

Posted 06 July 2011 - 11:36 AM

Hi there. I am new to wordpress and I have been unnable to find an answer to my question in the WP forums. Here is what I am trying to do. I have created a page in WP, through the WP admin area of my site. On the page I need to add a link to a PHP file that I uploaded. The link must contain an image. After writing the script and looking at the preview, everything looked great, the clickable image was there and the correct page came up when I clicked it. i then published the page, and now I can look at the page, but the links are gone. I assume I need to change something with the image path, but I have no idea how.

The images where uploaded using the image uploader, and I found them in the uploads/2011/07 folder, but using that path did not help. Here is code that is supposed to show the clickable image on the page, please let me know what I need to change so this will work:

<a href="results_open.php" onclick="window.open('results_open.php','popup','width=800,height=600,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="./uploads/2011/07/open_button.png"></a>



Is This A Good Question/Topic? 0
  • +

Replies To: How to added a linked image to a wordpress page

#2 teahou  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 223
  • Joined: 01-April 11

Re: How to added a linked image to a wordpress page

Posted 06 July 2011 - 11:55 AM

Ok, I got the images to show by using the upload manager within the page editor. Now I jst need to know where I need to put the two .php files I am trying to link to (result_open.php and results_closed.php).

Right now if you click on the link, I get a popup window with the site in it (header and left/right sidebars, and a notice in the center content area the page could not be found. I don't want the header or side bar to show in the pop window, just the content of the results.php file. Ideas?
Was This Post Helpful? 0
  • +
  • -

#3 teahou  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 223
  • Joined: 01-April 11

Re: How to added a linked image to a wordpress page

Posted 06 July 2011 - 12:33 PM

I think I have confused the issue a bit, so let me simplify.

I have 2 php files that contain code to pull and display data from a mysql table. I have a wordpress page with links on it, that need to open the 2 php files, so the when the user clicks the link, the table opens in a new window.

Right now, when the link is clicked I get a 'file not found' type error. So, I need to know where I FTP the php files to (what directory, currently they are in the same folder as the index.php, wp-content/results_open.php, etc).
Was This Post Helpful? 0
  • +
  • -

#4 teahou  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 223
  • Joined: 01-April 11

Re: How to added a linked image to a wordpress page

Posted 06 July 2011 - 03:35 PM

I figured it out. i put the files in the main directory with the index.php, then in my links, I put the entire URL, pretending the file was on another site.
Was This Post Helpful? 1
  • +
  • -

#5 TweeTmyFreaK  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 16
  • Joined: 13-August 11

Re: How to added a linked image to a wordpress page

Posted 13 August 2011 - 01:10 AM

Mmmm... use urls like this: /images/myimage.jpf

The / is used to go tothe root directory.

<Removed spam links>

This post has been edited by macosxnerd101: 13 August 2011 - 05:44 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1