wu
Forum Replies Created
-
AuthorPosts
-
October 1, 2014 at 3:22 pm in reply to: WPML: how to show places in default language when translation is missing #17146This reply has been marked as private.September 30, 2014 at 1:30 pm in reply to: WPML: how to show places in default language when translation is missing #16976This reply has been marked as private.September 29, 2014 at 1:36 pm in reply to: WPML: how to show places in default language when translation is missing #16858This reply has been marked as private.September 29, 2014 at 4:35 am in reply to: WPML: how to show places in default language when translation is missing #16833
The support over there is telling me to add an “OR” statement to the “WHERE” part to include the default language or the translations.
I tested this and found out that the place is showing up twice if there is a translation.
The support now suggests to filter that out in a while loop.
What is your opinion about this?
I am almost sure this will collide with pagination, “num_rows” and “LIMIT” in the query, as the query will return the wrong number of rows in some cases.
What can I tell them?September 24, 2014 at 1:22 pm in reply to: WPML: how to show places in default language when translation is missing #16384When I replace:
$where .= " AND icl_t.language_code = '$lang_code' AND icl_t.element_type IN('post_".$q_post_type."') ";
with:
$where .= " AND icl_t.language_code = '$default_lang_code' AND icl_t.element_type IN('post_".$q_post_type."') ";
in geodir_default_where(), posts are showing up only in the default language only, so this seems to be the right place.
Is this function controlling all GeoDirectory posts on all pages, or is there more code to look out for?
September 24, 2014 at 11:26 am in reply to: WPML: how to show places in default language when translation is missing #16376The guys over there are asking for the code that displays the posts.
I think it is code in geodirectory-functions/listing_filters.php, but I am not sure about that. Could you please point me to the correct location?September 22, 2014 at 3:59 pm in reply to: WPML: how to show places in default language when translation is missing #16143What I found out so far, is that there is a setting called “Blog posts to display” that does exactly what I need, but only for blog posts and not for other post types. As I understand, it would require custom coding for other post types.
Here I found an example for that:
/* WPML * Display default content on missing languages */ add_filter('icl_ls_languages', 'wpml_ls_filter'); function wpml_ls_filter($languages) { global $sitepress; $default_url = $languages[$sitepress->get_default_language()]['url']; foreach($languages as $lang_code => $language){ if($languages[$lang_code]['missing']==1){ $languages[$lang_code]['url'] = $default_url; } } return $languages; }
But in that form it does not work.
Maybe I need to attach it to another hook?Or would some customization of the query like in that thread be needed?
September 22, 2014 at 3:25 pm in reply to: Details page: How to move rating stars from sidebar to content area? #16136Moving the favorite button works for me, thanks.
Oh, in Safari it seems to break the tabs. All tab contents are visible at once.
September 22, 2014 at 3:01 pm in reply to: Details page: How to move rating stars from sidebar to content area? #16135I did not test the ordering part yet, but moving the comments works for me. 🙂
September 22, 2014 at 12:22 pm in reply to: Details page: How to move rating stars from sidebar to content area? #16113Moving the favorite button works for me, thanks.
Moving the review section breaks the page for me as well.
September 21, 2014 at 5:20 pm in reply to: Details page: How to move rating stars from sidebar to content area? #16057What is it u want to do with the tabs?
Mainly extracting the comments from the tabs and display them below the tabs, as I think that they deserve a more prominent placing.
Also, I would like to reorder the tabs, as I want to have “More Info” as the first tab.September 21, 2014 at 3:35 pm in reply to: Details page: How to move rating stars from sidebar to content area? #16047Thanks, Stiofan.
Is the favorite/unfavorite link contained in that list? Judging by the names, it does not look it is.
Do you have a similar list for the tabs in the content section?
I am referring to these elements: Profile, More Info, Reviews, …September 21, 2014 at 3:16 pm in reply to: Details page: How to move rating stars from sidebar to content area? #16042Actually I mean the favorite/unfavorite link with the heart icon.
But what I am generally after, is knowing all the hooks and actions that are relevant for the elements that get automatically rendered into the sidebar.
Same thing for the tabs in the content section.
I would like to rearrange some things on that page and it would tremendously help to know the relevant hooks and actions.September 21, 2014 at 2:24 pm in reply to: WPML: how to show places in default language when translation is missing #16034I tried both settings, but got the same result: it only shows places in the current language and nothing if there is no translation for the current language.
September 21, 2014 at 1:58 pm in reply to: WPML: how to show places in default language when translation is missing #16031All that I found is the switch that decides if places get translated or not.
In both options, the listings only display places with the current languages. -
AuthorPosts