Marc Mathys

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 195 total)
  • Author
    Posts
  • in reply to: GD-Booster breaks WordPress Input form #367243

    Marc Mathys
    Expired Member
    Post count: 216
    This reply has been marked as private.
    in reply to: Strange language switch when changing CPT #367149

    Marc Mathys
    Expired Member
    Post count: 216

    Thanks, that was quick to implement. All good now.

    Cheers,
    Marc

    in reply to: Strange language switch when changing CPT #367134

    Marc Mathys
    Expired Member
    Post count: 216

    Hi 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,
    Marc

    in reply to: Strange language switch when changing CPT #367122

    Marc Mathys
    Expired Member
    Post count: 216

    Hi 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,
    Marc

    in reply to: GD-Booster breaks WordPress Input form #366930

    Marc Mathys
    Expired Member
    Post count: 216
    This reply has been marked as private.
    in reply to: Strange language switch when changing CPT #366612

    Marc Mathys
    Expired Member
    Post count: 216

    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,
    Marc

    in reply to: Strange language switch when changing CPT #366376

    Marc Mathys
    Expired Member
    Post count: 216

    Hi Kiran,

    Thank you for looking into this.

    Best,
    Marc

    in reply to: Strange language switch when changing CPT #366329

    Marc Mathys
    Expired Member
    Post count: 216
    This reply has been marked as private.
    in reply to: Redirect not working after FB login / register #364643

    Marc Mathys
    Expired Member
    Post count: 216

    Thanks Stiofan, the issue is solved.

    This was the last open ticket I had from the launch. Feeling great!!

    Cheers,
    Marc

    in reply to: Redirect not working after FB login / register #364507

    Marc Mathys
    Expired Member
    Post count: 216

    Hi 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,
    Marc

    in reply to: Redirect not working after FB login / register #364433

    Marc Mathys
    Expired Member
    Post count: 216

    Hi Paolo,

    Did someone get a chance to look at this?

    Thanks,
    Marc


    Marc Mathys
    Expired Member
    Post count: 216

    Hi 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,
    Marc


    Marc Mathys
    Expired Member
    Post count: 216

    Hi 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,
    Marc


    Marc Mathys
    Expired Member
    Post count: 216
    This reply has been marked as private.
    in reply to: Redirect not working after FB login / register #361858

    Marc Mathys
    Expired Member
    Post count: 216
    This reply has been marked as private.
Viewing 15 posts - 91 through 105 (of 195 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount