stratboy
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Polylang compatibility with WP All Import@cleuenberg hi, yes, now I see. That’s because at wordpress.stackexchange they have always been shortsighted and thick headed as cops. In fact, they are just cops, not coders.
The original (and useful, as we all can see now) question was closed and then deleted because ‘appears to be off-topic’. And for them, off-topic means not strictly wordpress-related. Since Polylang is a wordpress plugin and thus not strictly wordpress-related (surprised? Don’t you think man?), you cannot ask polylang questions there as well as any plugin question. Sorry.
You could, anyway, just repost your question, then link here so I can go there and repost my answer as well (since I can still see it, being the author). Then they’ll close it again, but at that point you’ll have the code available forever ??
Forum: Plugins
In reply to: [Polylang] Polylang compatibility with WP All Import@pybanaszak please see my post on stackexchange.
I think the problem starts with Elementor and get solved by using Elementor, so it’s ‘inside’ Elementor, not ‘outside’. The solution is the following:
function is_elementor(){ global $post; return \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID); }
- This reply was modified 6 years, 10 months ago by stratboy.
Forum: Plugins
In reply to: [Polylang] Polylang compatibility with WP All ImportShould be implemented in polylang as default right now, it’s a really old issue, and Polylang Pro does cost just too much to have such a problem.
In the meanwhile, I posted a solution here:
I really hope Polylang devs will fix this problem very soon.
- This reply was modified 7 years, 2 months ago by stratboy.
Forum: Plugins
In reply to: [Redirection] problems with queryvars and urlencodingYeah, so we can assume current working copy with the patch is good for production?
Fantastic, thank you very much!
Forum: Plugins
In reply to: [Simple Page Ordering] Problems with polylangWill the new version support Polylang?
Especially when on backoffice one is filtering posts by language (as usual).
It it possible to reorder on a per-language basis using Polylang plugin?
And if yes, will doing it on some other languare screw up the overall orderings or will the plugin take into account and preserve the per-language ordering?Thank you, regards
Mmm that’s an interesting addon but it’s not what I’m searching for.
Basically my setup is the current:
– custom post type, with custom metaboxes.
– I need to use metabox values in the middle of the elementor layout (between some 2 sections)
– I also need to use those metaboxes values elsewhere (for example, query the last 3 posts of that post type and build an home slideshow from the metabox values of each post).
For now, the solution I depicted above works just fine: build simple shortcodes that query the metabox values and use them via the elementor’s shortcode widget. And so, for the home sliedhow, I’ll just do plain old post_meta queries. So I solved my problem.
Though, it would be REALLY powerfull if I could treat elementor’s sections (or widgets) just like metaboxes. Thus virtually eliminating the need of custom metaboxes. It would be simply fantabulous! ??
I mean, for example, fake code from the home:
foreach my_custom_posts as post echo get_elementor_section(post->ID, elementor_section->ID)
It would be even better if I could give a ‘slug’ name to sections, so I could avoid relying on the section’s ID and thus use the same slug (for example) for each post translations (say I’m using polylang…)
That’s what i mean. I’m pretty sure Elementor is already using some kind of pointer that identifies sections and link them with their corresponding post. So probably it’s just a matter of making it public and add some more utility/api functions.
- This reply was modified 8 years ago by stratboy.
So I probably should:
1. program custom metaboxes for content I want query
2. Build some custom shortcodes that get values from the metaboxes
3. Use the shortcodes via widget inside elementorIs it correct? Any other smarter way maybe?
Thank you
Ok but that’s not what I’m searching for: as I wrote, I need to insert the custom queries I usually do to get the metabox values in page.
So what would you suggest? What would you do if you were me? I was thinking of custom shortcodes: maybe?
Thank you
Forum: Plugins
In reply to: [Polylang] Multisite to Polylang migrationOk thank you, your suggestions already help a little.
Regards
Forum: Plugins
In reply to: [Polylang] link translation seems not to consider 2 taxonomy termsFor now I’m solving like this, but it implies too much queries, not too optimized:
//this is another substitution, but not relevant to this thread issue $step_1 = str_replace('product_categories', $prod_string, $url); //now check the query vars global $wp_query; $current_query_vars = $wp_query->query_vars; //if second taxonomy/term, then get translation and add to the generated link if(isset($current_query_vars['portioning'])){ $term = get_term_by('slug',$current_query_vars['portioning'],'portioning'); $lang_term_id = pll_get_term($term->term_id, $lang); $lang_term = get_term($lang_term_id, 'portioning'); $lang_term_slug = $lang_term->slug; return $step_1 . $lang_term_slug . '/'; }
Forum: Plugins
In reply to: [Polylang] link translation seems not to consider 2 taxonomy termsHi, thank you. Anyway, I’m already doing that, but the $url passed to the filter callback already doesn’t have the second taxonomy. Seems like it doesn’t read all the query vars before trying to translate.
Forum: Plugins
In reply to: [Polylang] link translation seems not to consider 2 taxonomy termsP.s.
I just noticed that even deactivating permalink structures, and navigating directly to the url vars link, polylang won’t take into account the second term. So, an url like this:https://mysite.com/?product_category=delattosati&portioning=julienne
will be traslated into
https://mysite.com/?product_category=delattosati-en&lang=en
no portioning taxonomy term translation.
Forum: Plugins
In reply to: [Polylang] Translate custom post type slugSame problem here, it’s a really important feature you should implement soon, Chouby! ??