css and images not showing up in wordpress edit view
I'm trying to see my template page in the visual view in wordpress's 'edit page' section. Just like this guy is doing in the tutorial here at about 7:20. http://www.youtube.com/watch?v=1o2开发者_JAVA技巧XcHqQbRY
But in mine the css and images will not show up. When I view the page on my localhost, the css works but the image still doesn't show. I'm using the blogpost() function but it looks like the edit mode in wordpress isnt liking the php. It keeps changing the "<" and ">" to "& gt;" when i go from html view to visual view.
I know its always a pain to try to figure this stuff out without the code, but has anyone ran into this and found a fix?
Ok I hope this post makes sense. Thanks in advance everyone.
Did u reference the style sheet url in the header.php as
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css"media="screen" />
and the images you should be referencing as something like this..
<img alt="" src="<?php bloginfo('template_url'); ?>/images/logoOrange.png" style="float:left; margin-left:34px;" border="0" />
and hope this will work...
Are you sure, that paths to images inside of your server lines up?
As I saw in 8:03, its <img src="images/foo" />
points to folder, which is in root of server, but you might think, that his images folder is in wp-content/themes
folder. In this case - nop.
In case to get those images working, upload those images, which you would like to use, using Wordpress image uploader, which puts images in wp-content/uploads
folder, and then you could grab URL of image, and put it into post or page.
Or make folder images
on root directory, and upload all pictures there.
I suggest you to use Chrome Browser, and Inspect Element features to debug markup and css ;)
精彩评论