Stiofan O'Connor

Forum Replies Created

Viewing 15 posts - 11,056 through 11,070 (of 13,774 total)
  • Author
    Posts
  • in reply to: Licensing #46830

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Nevis,

    You can use GD on any website you own, we are not restrictive like that 🙂

    Stiofan

    in reply to: Categories and Viewing Listing Defaults #46808

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Christy,

    I am not sure how good you are with code so let us know if you need more help but adding this to your theme functions.php should do it (not tested).
    Basically we order them A-Z, i have removed that part in this code

    Thanks,

    Stiofan

    
    
    
    remove_action('geodir_details_taxonomies', 'geodir_action_details_taxonomies', 10);
    add_action('geodir_details_taxonomies', 'my_geodir_action_details_taxonomies', 10);
    /**
     * Output link to the posts categories and tags.
     *
     * @global bool $preview True of on a preview page. False if not.
     * @global object $post The current post object.
     * @since 1.0.0
     * @package GeoDirectory
     */
    function my_geodir_action_details_taxonomies()
    {
        global $preview, $post;?>
        <p class="geodir_post_taxomomies clearfix">
        <?php
        $taxonomies = array();
    
        $is_backend_preview = (is_single() && !empty($_REQUEST['post_type']) && !empty($_REQUEST['preview']) && !empty($_REQUEST['p'])) && is_super_admin() ? true : false; // skip if preview from backend
    
        if ($preview && !$is_backend_preview) {
            $post_type = $post->listing_type;
            $post_taxonomy = $post_type . 'category';
            $post->$post_taxonomy = $post->post_category[$post_taxonomy];
        } else {
            $post_type = $post->post_type;
            $post_taxonomy = $post_type . 'category';
        }
    //{	
        $post_type_info = get_post_type_object($post_type);
        $listing_label = $post_type_info->labels->singular_name;
    
        if (!empty($post->post_tags)) {
    
            if (taxonomy_exists($post_type . '_tags')):
                $links = array();
                $terms = array();
                // to limit post tags
                $post_tags = trim($post->post_tags, ",");
                $post_id = isset($post->ID) ? $post->ID : '';
                /**
                 * Filter the post tags.
                 *
                 * Allows you to filter the post tags output on the details page of a post.
                 *
                 * @since 1.0.0
                 * @param string $post_tags A comma seperated list of tags.
                 * @param int $post_id The current post id.
                 */
                $post_tags = apply_filters('geodir_action_details_post_tags', $post_tags, $post_id);
    
                $post->post_tags = $post_tags;
                $post_tags = explode(",", trim($post->post_tags, ","));
    
                foreach ($post_tags as $post_term) {
    
                    // fix slug creation order for tags & location
                    $post_term = trim($post_term);
    
                    $priority_location = false;
                    if ($insert_term = term_exists($post_term, $post_type . '_tags')) {
                        $term = get_term_by('name', $post_term, $post_type . '_tags');
                    } else {
                        $post_country = isset($_REQUEST['post_country']) && $_REQUEST['post_country'] != '' ? $_REQUEST['post_country'] : NULL;
                        $post_region = isset($_REQUEST['post_region']) && $_REQUEST['post_region'] != '' ? $_REQUEST['post_region'] : NULL;
                        $post_city = isset($_REQUEST['post_city']) && $_REQUEST['post_city'] != '' ? $_REQUEST['post_city'] : NULL;
                        $match_country = $post_country && sanitize_title($post_term) == sanitize_title($post_country) ? true : false;
                        $match_region = $post_region && sanitize_title($post_term) == sanitize_title($post_region) ? true : false;
                        $match_city = $post_city && sanitize_title($post_term) == sanitize_title($post_city) ? true : false;
                        if ($match_country || $match_region || $match_city) {
                            $priority_location = true;
                            $term = get_term_by('name', $post_term, $post_type . '_tags');
                        } else {
                            $insert_term = wp_insert_term($post_term, $post_type . '_tags');
                            $term = get_term_by('name', $post_term, $post_type . '_tags');
                        }
                    }
    
                    if (!is_wp_error($term) && is_object($term)) {
    
                        // fix tag link on detail page
                        if ($priority_location) {
                            $links[] = "<a href=''>$post_term</a>";
                        } else {
                            $links[] = "<a href='" . esc_attr(get_term_link($term->term_id, $term->taxonomy)) . "'>$term->name</a>";
                        }
                        $terms[] = $term;
                    }
                    //
                }
                if (!isset($listing_label)) {
                    $listing_label = '';
                }
                $taxonomies[$post_type . '_tags'] = wp_sprintf('%s: %l', ucwords($listing_label . ' ' . __('Tags', GEODIRECTORY_TEXTDOMAIN)), $links, (object)$terms);
            endif;
    
        }
    
        if (!empty($post->$post_taxonomy)) {
            $links = array();
            $terms = array();
            $termsOrdered = array();
            if (!is_array($post->$post_taxonomy)) {
                $post_term = explode(",", trim($post->$post_taxonomy, ","));
            } else {
                $post_term = $post->$post_taxonomy;
            }
    
            $post_term = array_unique($post_term);
            if (!empty($post_term)) {
                foreach ($post_term as $post_term) {
                    $post_term = trim($post_term);
    
                    if ($post_term != ''):
                        $term = get_term_by('id', $post_term, $post_taxonomy);
                        if (is_object($term)) {
                            $links[] = "<a href='" . esc_attr(get_term_link($term, $post_taxonomy)) . "'>$term->name</a>";
                            $terms[] = $term;
                        }
                    endif;
                }
                // order alphabetically
                /*asort($links);
                foreach (array_keys($links) as $key) {
                    $termsOrdered[$key] = $terms[$key];
                }
                $terms = $termsOrdered;
    */
    
            }
    
            if (!isset($listing_label)) {
                $listing_label = '';
            }
            $taxonomies[$post_taxonomy] = wp_sprintf('%s: %l', ucwords($listing_label . ' ' . __('Category', GEODIRECTORY_TEXTDOMAIN)), $links, (object)$terms);
    
        }
    
        if (isset($taxonomies[$post_taxonomy])) {
            echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>';
        }
    
        if (isset($taxonomies[$post_type . '_tags']))
            echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>';
    
        ?>
        </p><?php
    }
    in reply to: HELP – need a developer to make this look good! #46800

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I know this is a job post and we don’t do customisation but i see your theme needs some compatibility settings, if you can provide me wp-admin in a private reply i will adjust it for you. Just tick “set as private reply” when replying and only staff will be able to see it.

    Thanks,

    Stiofan

    in reply to: page load time has become unacceptable #46797

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    Please provide wp-admin, ftp, DB access and the spec of your hosting and i will investigate.

    Thanks,

    Stiofan

    in reply to: Stripe users being charged #46794

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    This reply has been marked as private.
    in reply to: Can not import FB page #46793

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    :):):)

    in reply to: Can not import FB page #46789

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Awesome! 🙂

    in reply to: Can not import FB page #46786

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Feel free to leave us a review to help us grow 😉 It’s very much appreciated by us all!
    https://wordpress.org/support/view/plugin-reviews/geodirectory

    Stiofan

    in reply to: Can not import FB page #46785

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Oops yeah, change that over to your one, i just created a new test app to test it.

    Thanks for choosing GD 🙂

    Stiofan

    in reply to: Can not import FB page #46779

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This should be fixed for you now.

    Stiofan

    in reply to: Redirect Loop on Region Search #46778

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Great!

    It was a bug, not ur fault but ours, it was caused by a combination of settings, thanks for finding it 🙂

    Thanks,

    Stiofan

    in reply to: Pagination error inside lintings #46756

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Thanks for the info, there seems to be a rouge post in your place details table, post_id=1195. If you pass me DB access details i will investigate, otherwise i would just delete that row.

    Thanks,

    Stiofan

    in reply to: Cloudflare ssl and map pins not ssl/https #46632

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Great!

    Stiofan 🙂

    in reply to: Redirect Loop on Region Search #46618

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Dale,

    Thanks for the info, please check now, i think it was a bug.

    Stiofan

    in reply to: Navigation (mobile) #46608

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Great, feedback is always appreciated.

    Thank you!

    Stiofan 🙂

Viewing 15 posts - 11,056 through 11,070 (of 13,774 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount