atheerhuwa
Forum Replies Created
-
The handle for storefront child is storefront-child-style, not child-style.
Now it works perfectly.Hi Condless,
The PHP works, I finally found the issue today in the css. The overflow: visible for the page was causing the problem. I switched it in the mobile design to overflow: auto and the issue was solved.Hi, it works apparently on your iPhone.
On Safari on my iPhone 6s the image background is completely missing and will only be found somewhere far at the left top if one keeps moving to that direction.
On Samsung Internet nothing other than the background image can be seen.
The screenshot is from Firefox. The issue is only visible on the shop page in Arabic.- This reply was modified 5 years, 2 months ago by atheerhuwa.
- This reply was modified 5 years, 2 months ago by atheerhuwa.
Forum: Plugins
In reply to: [WooCommerce] How to exclude customers from specific countriesJust noticed something.
In Status – Logs the following errors:
geolocation-2020-01-19-3a3201f5f5a6e6b9d22668fe74425dad.log2020-01-19T22:19:53+00:00 NOTICE Unable to download GeoIP Database: A valid URL was not provided.
2020-01-19T23:14:32+00:00 NOTICE Unable to download GeoIP Database: A valid URL was not provided.And on another website I have the following errors in the log:
geolocation-2019-12-05-27c587b349b1985e19a649ebba66139b.log
2019-12-05T22:35:51+00:00 NOTICE Unable to download GeoIP Database: Service Unavailable
2019-12-05T22:55:00+00:00 NOTICE Unable to download GeoIP Database: Service Unavailablegeolocation-2019-12-05-27c587b349b1985e19a649ebba66139b.log
2019-12-05T22:35:51+00:00 NOTICE Unable to download GeoIP Database: Service Unavailable
2019-12-05T22:55:00+00:00 NOTICE Unable to download GeoIP Database: Service UnavailableHow to fix these issues?
- This reply was modified 5 years, 2 months ago by atheerhuwa.
- This reply was modified 5 years, 2 months ago by atheerhuwa.
- This reply was modified 5 years, 2 months ago by atheerhuwa.
Hi Jarret,
I put back the hand held navigation at the bottom of the website for the problem to be clearer.
This is a screenshot from Firefox developer tools when you choose Responsive design mode and click on the hand symbol on the top right “enable touch simulation”:
https://snipboard.io/an9kRq.jpg
It happens only in Arabic and only on the shop page.
You see that only the basket appears, becauee the search and user account buttons are far on the left side. The website is much wider than the screen.
Also, regardless of the settings chosen for scrolling the background image, it is still not visible at the bottom of the page.
- This reply was modified 5 years, 2 months ago by atheerhuwa.
- This reply was modified 5 years, 2 months ago by atheerhuwa.
Thanks Dragos,
Now I notices the error of using that shortcode. I was using en_US in the code while the second language of my site is en_GB, I changed it and it worked using the code below pasted in the page:<div class=”translation-block”>
[trp_language language=”de_DE”]
<p>The Text in German</p>
[/trp_language][trp_language language=”en_GB”]
<p>The text in British English</p>
[/trp_language]</div>
My final question: Does that not work for pages with three languages or more or will it have disadvantages like performance or Seo issues?
- This reply was modified 5 years, 3 months ago by atheerhuwa.
Ok it seems there is a bug. One page remembers the previous translation of similar original page, another does not.
Ok, I see the translation memory is working and showing the older translation of similar older versions of the page. It is still good if there will be the option to add all the languages in the same page.
RegardsIsn’t it possible to put all languages in the post one after another using e.g. shortcodes like with Transposh?
Hi again,
Thanks for your reply.
I tried this and it worked for me, but whenever anything changes in the original language page, the translated page switches back to the original language and has to be translated again. That could be an issue for clients of developers who are not aware of this.If there is any other way to translate complete pages at once, please inform me.
One thing I still like to do is not to load child style.css at all in case of RTL to avoid the need to “zero” the LTR style margin values in the RTL stylesheet. I dequeued the child style but is still loading:
Here is the code:
add_action( ‘wp_enqueue_scripts’, ‘storefront_enqueue_styles’, 999);
function storefront_enqueue_styles() {
$parent_style = ‘storefront-style’;
if (is_rtl()){
wp_dequeue_style( ‘child-style’);
wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style-rtl.css’, array( $parent_style), wp_get_theme()->get(‘Version’) );
}
}Thanks Joy, but nothing from the above worked for me.
Here is what I found out:
1. The Storefront theme automatically enqueues parent and child themes so no need to enqueue them, so the functions.php remains blank and one can use rtl.css in the child theme and it will automatically override the child style.css.2. If one wants to add style-rtl.css in the child theme instead of rtl.css, the only way I found out to do that is by adding a priority like 999 to the action like the following:
add_action( ‘wp_enqueue_scripts’, ‘storefront_enqueue_styles’, 999);
function storefront_enqueue_styles() {
$parent_style = ‘storefront-style’;
if (is_rtl()){
wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style-rtl.css’, array( $parent_style), wp_get_theme()->get(‘Version’) );
}
}- This reply was modified 5 years, 4 months ago by atheerhuwa.
- This reply was modified 5 years, 4 months ago by atheerhuwa.
Hi Joy,
Thanks for your reply.
1. I changed $parent-style to ‘storefront-style’ and it did not work. So I looked into functions.php of the parent theme and it seems they called it just ‘storefront’:
$theme = wp_get_theme( ‘storefront’ );So I tried ‘storefront’ but it also did not work.
2. Regarding the version, what should I change?
3. Finally if I want to use wp_style_add_data( ‘parent-style’, ‘rtl’, ‘replace’ );
which lines should be deleted from the code of this post?- This reply was modified 5 years, 4 months ago by atheerhuwa.