cristian0k
Forum Replies Created
-
Hi GV,
Being new to WooCommerce I googled ‘attributes for categories’ and so far could not get a clear answer, but I have an alternate solution:
If you need ‘attributes’ that repeat for specific categories and all their products you should try custom fields instead. There is a free plug-in, ACF, that lets you create custom fields and you simply assign them to the desired categories. I’m not sure about the compatibility with Woo, but you get the idea.
If that does not work, try manually creating the custom fields, I found this link for Woo:
https://remicorson.com/mastering-woocommerce-products-custom-fields/There might be an easier way to do this, but since no-one answered your question I thought about sharing my thoughts on this.
Thank you very much for the quick response and a good fix. You saved my day.
I adapted the code to my needs and indeed I managed to get an url from an existing post ID.
For anybody needing explanations for the code above, the key is to get the url from ID using wp_get_attachment_image_src($small_image,’full’, true)[0];
Use conditions to make sure you’re passing an ID and not an url. In my case, the ACF get_field returns an ID, for an image, only in category pages.Until the plug in is fixed by the developer, this will work.
If you have a fix for this issue please post it here for future reference, I am having exactly the same problem.
Meanwhile, rolling back to version 4…
Forum: Plugins
In reply to: [Polylang] Homepage doesn’t change the languageStrange, at the moment (on the home page) I get german. I see the domain changing but not the content. Page source shows that all domains serve a page under lang=”de-DE.
– double check to see if the three home pages are linked by Polylang via checkmark
– do you have any additional code for the language switcher on the home page template, maybe there is a glitch with it?
– what happens if you set a different template and page for home page? does the language switch work?Forum: Plugins
In reply to: [Polylang] Media have no valid URL with Translation turned onIt could be far-stretched, but did you try in a different browser? or did you manage to replicate the issue on a different server?
To me it sounds like a caching issue of some sort.
Forum: Plugins
In reply to: [Polylang] Media have no valid URL with Translation turned onAre you using a cache plugin?
Did you try resetting your permalinks?Forum: Plugins
In reply to: [Polylang] Homepage doesn’t change the languagePolish or German doesn’t seem to work for me while navigating home page.
If your main language is EN:
1. Are you sure you have created page translations for Polish an German?
2. If yes, are they linked properly to the main language? Make sure the those links are set in the back-end.Forum: Plugins
In reply to: [Polylang] Menu doesn’t change on language switchMake sure the corresponding menu is assign in WP back-end/Appearance/Menus/Manage Locations.
When you create a menu you have to assign it to a specific language.
Example: English-Menu is assigned to the Primary Menu English.