I have modified the header.php to pull in an image instead of icons on my blog hoesbeforedoughs.co.uk, however the image only shows in firefox, it currently does not show in ie, chrome or safari.
Any ideas?
<div id ="icons">
<?php if ( $bavotasan_theme_options['header_icon'] ) { ?>
<img src='http://hoesbeforedoughs.co.uk/wp-content/uploads/2016/05/icons-01.png'></img>
<?php } else {
$space_class = ' class="margin-top"';
} ?>
</div>
your image http://hoesbeforedoughs.co.uk/wp-content/uploads/2016/05/icons-01.png does not exist anymore. Your Firefox browser cached it and that is why you are seeing it on firefox. Reupload the image to the correct folder with same name. Clear browsers cache. You will see it on all browser.
I tried opening your website in Firefox and the image is not found.
This could be a result of uploading images with the same name (or the same image multiple times). Wordpress automatically renames images with the same name. Perhaps you accidentally removed the duplicate with this url. If the image is still shown (especially if it's only for one browser) it may be cached. If you delete your cache I doubt you will still see the image.
To solve this, go to the "media" section of the admin area and check if the image is still there. If so, click on it and take the exact url for the image and put it as the source for your image in the php file.
Related
When I go to this page from home page. It shows proper font. But when I refresh this page its font gets changed.
Please see the screenshots:
check your browser console there is font error means fonts not found
GET http://www.stitchstudio.co/about/fonts/DINNextLTProBold.woff2
GET http://www.stitchstudio.co/about/fonts/DINNextLTProRegular.woff
GET http://www.stitchstudio.co/about/fonts/DINNextLTProBold.woff
GET http://www.stitchstudio.co/about/fonts/DINNextLTProRegular.ttf
GET http://www.stitchstudio.co/about/fonts/DINNextLTProBold.ttf
GET http://www.stitchstudio.co/wp-content/themes/lens/theme-content/css/fonts/DINNextLTProRegular.woff2
GET http://www.stitchstudio.co/wp-content/themes/lens/theme-content/css/fonts/DINNextLTProRegular.woff
GET http://www.stitchstudio.co/wp-content/themes/lens/theme-content/css/fonts/DINNextLTProRegular.ttf 404 (Not Found)
check path and fix it then it works perfectly
I guess you are not pointing to the theme directory in the right way, you should use get_stylesheet_directory_uri() or similar.
<?php echo get_stylesheet_directory_uri(); ?>/font-folder/font.extension
right now, it's not using it, so from homepage, font gets loaded because it points to:
http://www.stitchstudio.co/fonts/DINNextLTProRegular.woff2
for other pages it is not, and it will use page url, not site url, just like:
http://www.stitchstudio.co/about/fonts/DINNextLTProRegular.woff2
causing the error.
I write a post in new post editor and then add media. I can see the images in the editor but when i publish them they aren't loading up and a frame with little square in the middle comes up. This is the link to one of my posts: http://getprogramcode.com/2013/03/c-program-for-bit-stuffing/ . For some people only link to the image comes up and it opens up with 404 error. See the line after OUTPUT: bit stuffing.
Also i want to remove the featured image from appearing in my posts. I have a option in my theme on a new post: "disable featured image" - but that doesnt work . Also if i dont put the image or i remove the featured image the empty image appears: see the home page: http://getprogramcode.com Please help me to solve this problem
You should not use relative paths on WordPress, only Absolute paths.
The problem is that you are using ../wp-content/... as your URL's for image paths.
When adding images, you should have the option to give it a path, you should opt to link to the media file.
For the disable feature image, if you go into the page.php or single.php code, it should have a line of code in it for calling in the featured image.
It should look something like this:
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
You just need to remove or comment out this code and it should stop showing up on the pages.
This is the open graph image I want to load on all my pages shared on Facebook. It is loading properly on some pages and on others it is choosing a random image from the page. Below is the OG URL. I am using Drupal CMS for my site. All the proper code seems in place.
http://www.vaeducationoxnard.com/sites/default/files/styles/square_thumbnail/public/Charter%20Square%20Logo.png
This is because, facebook sends the whole new request to the url you are passing and because of this it gets the image from og:image in which you have passed the default image. To overcome this, try to aadd the image parameter in the url you are passing
Ex. your/url?imgToShare=
And in the main page from where you set the meta tags, add one condition
<?php
if(isset($_REQUEST['imgToShare'])
{
<set the meta tags for image you want>
}
else
{
<meta tag with the default image>
}
?>
This helped me.
Please comment if you have any doubts.
I have Gallery plugin installed.
I've uploaded my images and used snippet like this: [[Gallery? &album=1]].
Now I have thumbnails shown fine, but after clicking on image I'm sent to /index.php?id=4&galItem=2&galAlbum=1&galTag= address and nothing happens - this page is the same as the previous one.
Any ideas on what I am doing wrong?
You get the link to your page with id=4. In this page you have to get galItem, galAlbum and galTag and show corresponding image. I'm not sure you have handling this in your template.
Just try this:
[[Gallery? &album=1 &linkToImage=`1`]]
You will get the direct link to your image if you keep your thumbTpl chunk as in sample:
<a href="[[+linkToImage:if=`[[+linkToImage]]`:is=`1`:then=`[[+image_absolute]]`:else=`[[~[[*id]]?
&[[+imageGetParam]]=`[[+id]]`
&[[+albumRequestVar]]=`[[+album]]`
&[[+tagRequestVar]]=`[[+tag]]` ]]`]]">
Now you just get else part.
I have a Drupal photography website. Images are important to me and no matter how hard I try, how hard I google, I couldn't get those images to work on Facebook Open Graph sharing.
I am using Drupal 7.14.
Users upload photos by using Plupload plugin.
Over-sized photos are automatically resized by Plupload resize function.
These photos are uploaded into a custom-directory. eg. sites/default/files/products/[user:id]/
The photos are thumbnailed and styled according to Drupal core styling. eg. sites/default/files/styles/large/
These photos are displayed in a overriden node page, which I have customized using Panels.
Drupal modules currently don't support Open Graph tags for Panels, so I created them myself using drupal_add_html_head.
// OG Image Tag
$node = node_load(%node:nid);
$user = $node->uid;
$filename = $node->field_product_photos['und'][0]['filename'];
$base_url = "http://www.[my-web-site].com/sites/default/files/styles/large/public/products";
$image_url = $base_url . "/" . $user . "/" . $filename;
// Thus $image_url outputs my full image url address. eg. http://www.[my-web-site].com/sites/default/files/styles/large/public/products/1/[IMAGE].JPG
$element = array (
'#tag' => 'meta',
'#attributes' => array(
'property' => 'og:image',
'content' => $image_url
),
);
require_once 'includes/common.inc';
drupal_add_html_head($element, 'og_image');
I use http://ogp.spypixel.com/Pogo/checker/index.php?url=http%3A%2F%2Fwww.feelsion.com%2Fproduct%2Fd700 to check my OG tags. og:title, og:image, og:url, og:description works like a charm with no problems.
However Facebook Debugger https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.feelsion.com%2Fproduct%2Fd700 returns only ONE problem. That is - Unable to download og:image: The image referenced by the url of og:image tag could not be downloaded.
I can confirm that ogp.spypixel.com/Pogo/checker/ could display my og:image and the image url is healthy.
I am using HTTP, so HTTPS bug for Facebook og:image is irrelevant.
I have ALT-txt for my images.
I have also included <link rel="image_src" href="[IMAGE_LINK]"into <HEAD>.
My image sizes fulfills Facebook's criteria. At least 200px for both dimensions and not more than 3:1 by proportion.
I have declared og:namespace in my page.tpl.php file.
xmlns:og="http://ogp.me/ns#
No matter how hard I Google and amend the codes and try new images. Facebook still never display my photos and returns the error as in note #9.
Image such as my website logo can be displayed in Facebook sharing. The only images not displaying is from the custom node page/panel.
I have tried to amend FTP permissions for the images but still failed.
I suspect that Plupload plugin is the culprit that the images it resize cannot be rendered by Facebook OG.
I also suspect that could be a case-sensitivity issues on the file name or on the extensions of the image.
I have worked more than 24 hours on this problem and hopes are fading. I am still hopeful that I can find my enlightenment on the problem here. Please do assist me if you know the solution or you are experiencing the same problem.
Thank you.
The problem above occurred because of a HTTP 500 Internal Server Error on the image.
The image appears well with internet browser but is inaccessible by search engine bots.
I have solved the problem by disabling Option FollowSymLinks in the .htaccess file in /public_html/sites/default/files/ folder.
To disable the option permanently, you have to erase the content of the .htaccess file while retaining the file itself in the folder.
Hope that helps, cheers.