Web Pages Not Displaying Properly

Home Forums WordPress Theme CityBook – Directory & Listing WordPress Theme Web Pages Not Displaying Properly

This topic contains 106 replies, has 3 voices, and was last updated by  rockpaperclick 2 months ago.

Viewing 25 posts - 76 through 100 (of 107 total)
  • Author
    Posts
  • #23622

    rockpaperclick
    Participant

    Supported

    I am trying to fix the issues in tmpls.php but do not know where the template info is fed from (cannot find json outputted to the page). Any info related to this would be appreciated.

    Many thanks,

    Costa

    #23623

    rockpaperclick
    Participant

    Supported

    I have also updated

    <?php echo wp_get_attachment_image( $id, 'lgallery' ); ?>

    in single-listing.php to

    <?php echo wp_get_attachment_image( $id, 'medium', '', array('class' => 'lgallery') ); ?>

    #23671

    rockpaperclick
    Participant

    Supported

    So, after doing some research (and learning), I have decided you are using Underscore.js on tmpls.js and have solved my thumbnail issue by adding the following function to the top of the page and using it on maps and filtered listings.

    //Crop Image
    function cropImage(thumbnail) {
      var value = thumbnail;
      var arr = value.split(".");    // Split the string using dot as separator
      var lastVal = arr.pop();       // Get last element
      var firstVal = arr.join(".");  // Re-join the remaining substrings, using dot as separators
      
      return firstVal +"-424x280."+lastVal;
    }
    #23683

    CTHthemes
    Keymaster

    You just need edit thumbnail size from template_tags.php file: http://prntscr.com/k88aod to using citybook-listing-grid size in citybook_addons_get_listing_post_data function.
    This problem is fixed on the latest version. Also there are some codes added for implementing show/hide submit fields and listing single infos based on author membership package. Read more details at: http://assets.cththemes.com/themeforest/citybook/changelog/

    Thank you.

    #23692

    rockpaperclick
    Participant

    Supported

    Hi, Thanks for the update. I have downloaded the latest version from Theme Forest but it does not seem to include the “CityBook Add-Ons plugin”. please assist.

    #23697

    CTHthemes
    Keymaster

    Do you want to update it or viewing its code? (from theme folder/lib/plugins/ )

    #23700

    rockpaperclick
    Participant

    Supported

    I would like to do a custom update so I can keep the changes I have made to the plugin while updating.

    #23714

    CTHthemes
    Keymaster

    If so, I recommend you using template override from child theme.
    Just copy plugin files to cth_listing folder.
    For example you want to modify listing Price range widget, source file is \plugins/citybook-add-ons/template-parts/widget-price_range.php : http://prntscr.com/k8gwse
    so copy the file to \themes/citybook-child/cth_listing/template-parts/widget-price_range.php then edit.

    #23716

    rockpaperclick
    Participant

    Supported

    Good plan. But I cannot find the updated plugin folder in my Theme Forest download. Please see attached.

    Kind Regards,

    Costa

    Attachments:
    You must be logged in to view attached files.
    #23720

    CTHthemes
    Keymaster

    Please extract citybook.zip file. The plugin .zip file locate in \citybook/lib/plugins/ folder

    #23721

    rockpaperclick
    Participant

    Supported

    Thanks.

    #23912

    rockpaperclick
    Participant

    Supported

    Hi,

    Can you please let me know if there is a way to reset the View Counter on the CityBook listings?

    Kind Regards,

    Costa

    #23922

    CTHthemes
    Keymaster

    You can try this code:

    
    $view_count_metas = citybook_addons_get_meta_values( P_META_PREFIX.'post_views_count', 'listing', array('publish', 'pending') );
            if(is_array($view_count_metas) && count($view_count_metas)){
                foreach ($view_count_metas as $l_ID => $meta_value) {
                    if($meta_value != ''){
                        update_post_meta($l_ID, P_META_PREFIX.'post_views_count', '0');
                    }
                }
            }
    
    #23932

    rockpaperclick
    Participant

    Supported

    Thanks, I will give this a try. By the way I am still on the previous version of the theme as the update seems to remove Ads from searches? I have solved my issue with the duplicate posts as follows in loop.php:

    if ( have_posts() ) :
    
        /* Loop Through Ads */
        foreach($action_args['gmap_listings'] as $item) {
            $unique_title[] = $item['title'];
        }
        
        /* Start the Loop */
        while ( have_posts() ) : the_post();
            //Show Unique Listings
            if( !in_array(get_the_title(), $unique_title) ) {
                citybook_addons_get_template_part('template-parts/listing');
                $action_args['gmap_listings'][] = citybook_addons_get_listing_post_data();
            }
        endwhile;
    
    elseif(empty($action_args['gmap_listings'])):
    
    	citybook_addons_get_template_part('template-parts/search-no');
    
    endif;

    However I have noticed Ads don’t show up on the Category pages. Any idea how to turn them on for these pages?

    Many thanks,

    Costa

    #23937

    rockpaperclick
    Participant

    Supported

    I have looked at the settings and they seem to be correct?

    Attachments:
    You must be logged in to view attached files.
    #23954

    CTHthemes
    Keymaster

    Yes, the code had changed. It was replaced by this: http://prntscr.com/kbm0wj

    And disable this: http://prntscr.com/kbm193

    #24737

    rockpaperclick
    Participant

    Supported

    Hi, I would like to change over the Location field with a tags field as shown in the admin panel but I am unsure how to do this with CMB2. I have added the code below in \citybook-add-ons\inc\cmb2\functions.php but am unsure what to do next.

        $plan_cmb->add_field( array(
            'name'          => esc_html__('Location', 'citybook-add-ons' ),
            'desc'          => esc_html__('Add or remove locations.', 'citybook-add-ons' ),
            'id'            => $prefix . 'location',
            'type'          => 'tags',
        ) );

    Please see link here https://github.com/florianbeck/cmb2-field-type-tags.

    Many thanks,

    Costa

    #24768

    CTHthemes
    Keymaster

    It’s already in the sidebar: http://prntscr.com/khurms

    Thanks.

    #24788

    rockpaperclick
    Participant

    Supported

    Hi,

    Yes but on the Dashboard page it is displayed on one line under location. Please see attached.

    Kind Regards,

    Costa

    Attachments:
    You must be logged in to view attached files.
    #24798

    CTHthemes
    Keymaster

    So do you want author able to select locations ( instead of type to the input field, separate locations with commas )?

    #24803

    rockpaperclick
    Participant

    Supported

    Yes. As it stands, if I save the comma separated input field on the dashboard it breaks the tags in the admin panel.

    #24805

    CTHthemes
    Keymaster

    it breaks the tags in the admin panel. ?????

    #24808

    rockpaperclick
    Participant

    Supported

    Yes, it only shows the first selection as tagged in the admin panel once the listing is saved on the dashboard.

    #24817

    CTHthemes
    Keymaster

    Hi, would you show me the problem? I don’t understand.

    #24826

    rockpaperclick
    Participant

    Supported
Viewing 25 posts - 76 through 100 (of 107 total)

You must be logged in to reply to this topic.

Hello! CityBook version 1.2.7 was released. Bulk Import Add-On, OpenStreetMapView Details
+