how to stop wordpress hosted on iis from encoding and decoding images that contains arabic characters - wordpress

I have a wordpress website that I deployed on IIS the website had a problem earlier that arabic names for posts and categories was not working and after a lot of search I found an answer on stackoverflow that advice me to add those two lines in my wp-config.php file
if ( isset($_SERVER['UNENCODED_URL']) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];}
and thankfully it works for posts and categories , but the same problem is still happen in images in arabic and all these images are not shown in my website

Make sure your WordPress page contains below code:
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
Below is an example of HTML page:

Related

How disable a stylesheet in </head> when edit with WP Bakery editor

So i have a problem with a code that i added via a WP coder plugin ( a plugin that i can add HTML, CSS JS without coding intern Wordpress)
So the code i add is;
<meta http-equiv="refresh" content="180;url=https://test.link-example.nl/weer/" />
it will redirect in 180s = 3minutes. ( You can guess what happens in a front editor )
The annoying thing is that WPBakery in front-editor mode also redirected within 3 minutes. What i want is when im in the front-editor mode that it not redirect. Only when its in display mode-(just normal web view)
How to fix this?
Perrys.
I tried to make a class and display:none; but that doesn't work.

some characters display as "??????" in wordpress

I've problem on adding post to my wordpress site. When i add this "**Let't try Thai
website Sbobet ทงบอลออนไลน์**" to my site, it shows "**Let't try Thai website Sbobet ????????**" .
I've tried meta charset="UTF-8" in index file. But the problem is still there.
How to fix this issue?
Let's try to add the following line:
<meta http-equiv="Content-Language" content="th">
all the best
Fab.

Linked Stylesheet in WordPress

I am trying to build a second .css file for my company's website.
Currently, we are using a responsive theme, so most of our content displays correctly on desktop and mobile browsers. However, recently the boss is requesting custom code that is unresponsive. In order to keep the site looking good, I want to apply a secondary stylesheet that contains formatting for mobile devices. It would be like this for any html page:
<link rel="stylesheet" href="http://domain.tld/mobile.css" type="text/css" media="handheld" />
I cannot figure out how to get this into a wordpress child theme correctly. Can anyone offer suggestions?
Thank you in advance.
Look for the header.php file in your child theme directory, or under "Appearance"->"Editor" in the main menu of the your Wordpress adminpanel. You can paste the link to your new stylesheet there.
Also consider moving the styles to your theme's directory and replacing the domain in your href with <?php echo get_stylesheet_directory_uri(); ?> (example from wordpress codex).

Facebook og:image tag could not be downloaded from Drupal website

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.

showing categories wordpress in google result , HOW?

how are you?
this is my website: http://rehlat-world.com
when I search in google : site:rehlat-world.com
The result only "POSTS , PAGES , TAGS"
I need to include categories but I can't
this is example for category : http://rehlat-world.com/country/indonesia
=======================
The source of category page " " also it is include in sitemaps.xml http://rehlat-world.com/sitemap.xml
Please Help me how can include it.
Note I'm using this plugins (All in One SEO Pack و Google XML Sitemaps , WP Super Cache)
I can help you with your issue. This is an easy error to make and thankfully just as easy to fix.
If you take a look at the source code of your category pages (right click anywhere on page, select link to source code).
On line 9 you will see
<meta name="robots" content="index, follow" />
This is perfectly fine but then if you scroll down to lines 74 - 80, you will see All in One Seo plugin has also added its metatags,
<!-- All in One SEO Pack 1.6.13.2 by Michael Torbert of Semper Fi Web Design[418,446] --> <meta name="robots" content="noindex,follow"/> <link rel="canonical" href="http://rehlat-world.com/country/indonesia"/> <!-- /all in one seo pack -->
So you can see the repeated "robots" meta tag specifying "noindex". Simply go to into your All In One Seo plugin settings and disable the option to add robots meta tags to categories.
Obviously the first meta tag is all you need.
This will do the job and cats will be indexed in no time.
I will also add a suggestion that will help your site in the future by making it more appealing to your visitors and the search engines. I looked in your sitemap and noticed your permalinks are extremely ugly due to the Arabic text being used, which inturn cant be recognized by wordpress or the browsers because you still have wordpress set in English. You should really change your wordpress language config to Arabic.
The very first line in your source file says <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Strict//EN tells your browser the website is set in the English language and thats how the internet browsers should read the website. You should be able to fix this by adding in the header.php file of your theme, above the tag. I think this should work but im not 100% sure and may be wrong.
You also edit your wp-config.php file and find define ('WPLANG', '');, change that to define ('WPLANG', 'ar');. I have very little experiance with this so it would be wise to read http://codex.wordpress.org/Translating_WordPress#WordPress_Localization_Repository
could also save you time to do it with a plugin like http://wordpress.org/extend/plugins/gtranslate/
If you are already well aware of this and its not causing any issues with your rankings, disregard what I said.
Good luck
Aaron

Resources