Link to home
Start Free TrialLog in
Avatar of Reece
ReeceFlag for Australia

asked on

add external site's css to single wordpress page

There is a page I'm using on my wordpress website to scrape the weather from an external website.

My weather page is http://winghammotel.com.au/weatherzone-weather/  which is scraping from   http://www.weatherzone.com.au/nsw/mid-north-coast/wingham  using a plugin called "WP Web Scraper" and the shortcode [wpws url="http://www.weatherzone.com.au/nsw/mid-north-coast/wingham" selector="#structure_middle" ].

How can I apply the external website's css to this page so all of the content is formatted the same??
Avatar of James Williams
James Williams
Flag of United States of America image

Your going to need to add the CSS manually by adding ONE of the LINES of CSS commands from the original page you are scrapping.

There are several and they might conflict with the style of your page.
Goto the page you want to scrape and "VIEW SOURCE"  in  the first part of the code there are several
lines  containing " rel="stylesheet""  
Just copy the one you need and add themto the WP page.

		<link href="http://resources.weatherzone.com.au/wz/includes/css/head/standard/revisions/20110105/glob_head.css" rel="stylesheet" type="text/css" media="all" />

Open in new window


<Selvol





ALSO YOU SHOULD

Look into using the FREE API Supplied  from the
http://www.bom.gov.au/
catalogue/data-feeds.shtml



That is where the original data from the page you want to scrape comes from,...
SOLUTION
Avatar of Reece
Reece
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Reece

ASKER

Thanks for your help.  I managed to get this one sorted by creating a new "page" template with the external css linked in the header.
I also found that the scraping plugin I was using had a basehref setting that allowed me to add the domain for any src or href's (in the scraped data) that were referring to local urls.  eg. ../images/cloud.png became http://weatherzone.com.au/images/cloud.png