Marc Mathys
Forum Replies Created
-
AuthorPosts
-
This reply has been marked as private.
Thanks, that was quick to implement. All good now.
Cheers,
MarcHi Kiran,
Thanks this is great.
I have another version of that code running in my own plugin (that I use in the footer on the whole site): plugins/sd-kleo-geodir/sd-kleo-custom-cpt-category-widget.php so could you please patch it there too or just give me the changes you applied?
Thanks,
MarcHi Kiran,
Thanks for looking into it. Yes the advanced search works in both locations, but I was referring to the widget in the sidebar. I attached a screenshot for you to see the dropdown.
Thanks,
MarcThis reply has been marked as private.Hi Kiran,
Fantastic, it works now.
One thing I noticed though is that the order of the CPT is correct in the advanced search bar, but not on the widget in the sidebar. Restaurants should come in second position and I see it on the last position.This is the case in both French and English. Should I open a new thread?
Thanks,
MarcHi Kiran,
Thank you for looking into this.
Best,
MarcThis reply has been marked as private.Thanks Stiofan, the issue is solved.
This was the last open ticket I had from the launch. Feeling great!!
Cheers,
MarcHi Stiofan,
No problem. The site is online and fine now, not sure what happened earlier. I noticed Cloudinary had an outage earlier which could have affected the images from the site.
Anyways, I got a notification that you created an account so you should be able to see the problem. Make sure you’re logged out, then go to this link https://www.arbolife.com/directory-login/?redirect_add_listing=https%3A%2F%2Fwww.arbolife.com%2Fdirectory-add-listing%2F%3Flisting_type%3Dgd_restaurant and login with your Facebook account. You’ll be redirected to the homepage instead of the intended form to add a restaurant.
Thanks,
MarcHi Paolo,
Did someone get a chance to look at this?
Thanks,
MarcFebruary 22, 2017 at 9:14 am in reply to: Category links in menu with regional filter increase Google soft 404 #363089Hi Stiofan,
Thanks, it works like a charm. Here’s the code if someone wants to do the same thing:
/************************************************************************** * Remove the geodir_get_term_link Filter for building the Kleo menu * (this removes the location part of the link in all categories in the menu) **************************************************************************/ // Removing the filter also removes WPML slug translation. We need to create a new filter only for this. // Content of this function is inspired by geodir_term_link() in taxonomy_functions.php, line 1695 // (Note this function and it's usage can be removed if not using WPML) function custom_geodir_translate_term_link($termlink, $term, $taxonomy) { $geodir_taxonomies = geodir_get_taxonomies('', true); if (isset($taxonomy) && !empty($geodir_taxonomies) && in_array($taxonomy, $geodir_taxonomies)) { // Alter the CPT slug if WPML is set to do so if (function_exists('icl_object_id')) { $post_types = get_option('geodir_post_types'); $post_type = str_replace("category","",$taxonomy); $post_type = str_replace("_tags","",$post_type); $slug = $post_types[$post_type]['rewrite']['slug']; if (gd_wpml_slug_translation_turned_on($post_type)) { global $sitepress; $default_lang = $sitepress->get_default_language(); $language_code = gd_wpml_get_lang_from_url($termlink); if (!$language_code ) { $language_code = $default_lang; } $org_slug = $slug; $slug = apply_filters('wpml_translate_single_string', $slug, 'WordPress', 'URL slug: ' . $slug, $language_code); if (!$slug) { $slug = $org_slug; } $termlink = trailingslashit(preg_replace("/" . preg_quote($org_slug, "/") . "/", $slug ,$termlink, 1)); } } } return $termlink; } // Remove the geodir_get_term_link and add the custom filter before menu is built (after body tag) function remove_gd_term_link_filter() { remove_filter('term_link', 'geodir_get_term_link', 10); add_filter('term_link', 'custom_geodir_translate_term_link',10, 3); //delete this if not using WPML } add_action('kleo_after_body', 'remove_gd_term_link_filter'); // Remove the custom filter and add back the geodir_get_term_link filter before the main content function add_gd_term_link_filter() { remove_filter('term_link', 'custom_geodir_translate_term_link', 10); //delete this if not using WPML add_filter('term_link', 'geodir_get_term_link', 10, 3); } add_action('kleo_before_main', 'add_gd_term_link_filter');
Cheers,
MarcFebruary 20, 2017 at 11:23 pm in reply to: Category links in menu with regional filter increase Google soft 404 #362762Hi Paolo,
I understand this would work. I might prefer customising to avoid hardcoding all the links into menu.
Could you please point to the function or file in the GD plugin that creates those links?Thanks,
MarcFebruary 20, 2017 at 1:53 pm in reply to: GD Booster crashes Slider Revolution, Essential Grid & other theme features #362664This reply has been marked as private.This reply has been marked as private. -
AuthorPosts