Neil Hall

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 83 total)
  • Author
    Posts
  • in reply to: Categories and Custom Post Types #507754

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    Many thanks for looking into this. Changed all the slugs on the main categories and now seems to work fine.

    Your the best

    in reply to: Categories and Custom Post Types #507383

    Neil Hall
    Buyer
    Post count: 83

    I ran another test.
    In Restaurant I have a sub-category ‘Dutch restaurants’ If I edit this sub-category so it does not have a parent category ie ‘none’ then it will work fine in both the backend and the frontend. This is with and without Transposh activated.

    As soon as I make it a sub-category under ‘Restaurant’ it then does not work. I think it is a problem somewhere withing the Custom Post Type extension.

    Hope this helps

    in reply to: Categories and Custom Post Types #507377

    Neil Hall
    Buyer
    Post count: 83

    Hi Guust

    I don’t think Transposh is the problem here. If I deactivate Transposh and clear caches, permalinks etc the problem continues.

    I have found that on the CPT’s the primary category works without a problem. The problem occurs where there is a sub-category.

    As I mentioned above ‘Places’ work in both instances. So I came to the conclusion that it must be something within the Custom Post Types extension where it can not handle sub-categories

    Best Regards
    Neil

    in reply to: Categories and Custom Post Types #507356

    Neil Hall
    Buyer
    Post count: 83
    This reply has been marked as private.
    in reply to: Change to Review/comment Header #499079

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    Many thanks for your help. The code for 1. add url link to avatar works perfectly.

    For the 4. Add date when the review was written the code also works and the actual date is now showing. Is there a way of adding some text in front of the date? For example ‘This review was written on’

    Best Regards
    Neil

    in reply to: Custom Sidebars #498333

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    I have been doing some testing and it seems to be working now. Can you tell me what was changed.

    Many thanks once again for your great support

    in reply to: Change to Review/comment Header #498129

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    Thanks for coming back to me. In answer to your questions:
    1. add url link to avatar
    I guess I would need to change geodirectory/includes/class-geodir-comments.php line 533

    
    $avatar_size = apply_filters( 'geodir_comment_avatar_size', 44 );
    echo get_avatar( $comment, $avatar_size );
    printf( '<cite><b class="reviewer">%1$s</b> %2$s</cite>',
    

    To

    
    $avatar_size = apply_filters('geodir_comment_avatar_size', 44);
    $user_profile_url = get_author_posts_url( $comment->user_id );
    $comment_user_id = $comment->user_id;
    echo '';
    echo get_avatar($comment, $avatar_size);
    echo '';
    printf('<cite><b class="reviewer">%1$s</b> %2$s</cite>',
    

    2. Add a line stating which language the review was written in.
    In V1 I had the following code in my functions.php but I’m not sure how to get it to work in V2

    
    /*
    ==========================================================
    Adding Language written to Profile Tabs in Detail Listing
    ==========================================================
    */
    add_action('geodir_before_tab_content','my_text_before_profile' ,10,1 );
    
    function my_text_before_profile($tab_index ){
    $country = get_post_meta(get_the_ID(),'tp_language',true);
    $countryList = array(
    	'de' => 'German',
    	'en' => 'English',
    	'es' => 'Spanish',
    	'fr' => 'French',
    	'it' => 'Italian',
    	'nl' => 'Dutch');
    	$language = $countryList[$country];
    if($tab_index=='post_profile'){
    echo "<h6>This text was written in $language";
    echo ' - For the original text ';
    echo '<span class="no_translate">';
    echo '<a href="';
    echo site_url();
    echo "/$country";
    echo str_replace(home_url(), '', get_permalink());
    echo ' "> ';
    echo '</span>';
    echo 'click here</h6>';
    echo '';
    }
    }
    

    3. Add date when place was visited
    I guess that something like this would need to be inserted in geodirectory/includes/class-geodir-comments.phpbefore line 558 – <section class=”comment-content comment”>

    
    echo "<span class='item'>";
    $key = 'date_visited';
    $themeta = get_comment_meta(get_comment_ID(), $key, TRUE);
    if($themeta != '') {
    echo 'Visited ';
    }
    echo "$post->post_title";
    $key = 'date_visited';
    $themeta = get_comment_meta(get_comment_ID(), $key, TRUE);
    if($themeta != '') {
    echo ' on ';
    echo $display_date = date('d F, Y', strtotime(get_comment_meta( get_comment_ID(), 'date_visited', true)));
     }
    echo "</span>";
    $country = get_comment_meta(get_comment_ID(), 'tp_language', TRUE);
    if($country != '') {
    $countryList = array(
    	'nl' => 'Dutch',
    	'en' => 'English',
    	'es' => 'Spanish',
    	'fr' => 'French',
    	'it' => 'Italian',
    	'de' => 'German');
    	$language = $countryList[$country];
    echo "<span class='item'>";
    echo "This Review was written in $language";
    echo ' - For the original text ';
    echo '<span class="no_translate">';
    echo '<a href="';
    echo site_url();
    echo "/$country";
    echo str_replace(home_url(), '', get_comment_link($comment->comment_ID));
    echo ' "> ';
    echo '</span>';
    echo 'click here';
    echo '';
    echo "</span>";
    }
    

    4. Add date when the review was written
    geodirectory/includes/class-geodir-comments.php line 544

    
    printf( '<span class="geodir-review-time" title="%3$s">%2$s</span>',
    esc_url( get_comment_link( $comment->comment_ID ) ),
    sprintf( _x( '%s ago', '%s = human-readable time difference', 'geodirectory' ), human_time_diff( get_comment_time( 'U' ), current_time( 'timestamp' ) ) ),
    sprintf( __( '%1$s at %2$s', 'geodirectory' ), get_comment_date(), get_comment_time() )
    );
    

    To

    
    printf( '<span class="geodir-review-time" title="%3$s">%2$s</span>',
    esc_url( get_comment_link( $comment->comment_ID ) ),
    sprintf( _x( '%s ago', '%s = human-readable time difference', 'geodirectory' ), human_time_diff( get_comment_time( 'U' ), current_time( 'timestamp' ) ) ),
    sprintf( __( 'This Review was posted on %1$s at %2$s', 'geodirectory' ), get_comment_date(), get_comment_time() )
    );
    

    At present my site shows the date as the human readable time difference. How can I get it just to show the Date and Time posted?

    I do not understand how to do ‘customization with the use of hooks’. Any help would be appreciated.

    Best Regards
    Neil

    in reply to: Custom Sidebars #497748

    Neil Hall
    Buyer
    Post count: 83
    This reply has been marked as private.
    in reply to: Custom Sidebars #497574

    Neil Hall
    Buyer
    Post count: 83

    Hi Guys

    Sorry to come back to you again. The fix works well for the Detail Pages and the correct sidebars now get rendered.

    I have hit the same problem with the Archive Pages.
    I have set up a page called ‘GD Archive Place’ and within this set the sidebar to ‘GD Archive Sidebar’ .
    In Places > Settings > General I have set the Archive Page to ‘GD Archive Place’

    However when I look at the link ‘https://www.randomreview.info/places/’as an example the sidebar used is the default one.

    Is it possible there is a fix available for the Archive pages in the same way the Detail Page was fixed?

    Best Regards
    Neil

    in reply to: Listings Widget #496779

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    Many thanks, That fix seems to work great.

    Best Regards
    Neil

    in reply to: Listings Widget #496546

    Neil Hall
    Buyer
    Post count: 83

    Hi Guust

    If I tick that option all it does is use the current post type to display the Listings for the post type that the detail page is displaying. It seems to override the ‘Default Post type’ that you set in the Listings Widget.

    What I want to do in the Listings widget is to display different Post Types from the Detail Page post type, which it does very well.

    The problem is when the Listings widget does not find any of the required post types. But the url link will go to the add-listing page for the post type of the detail page, instead of going for the post type that the listings widget is displaying.

    Best Regards
    neil

    in reply to: Archive Page #495850

    Neil Hall
    Buyer
    Post count: 83

    Hi Kiran

    So sorry for the late reply. I took the opportunity to move the website to another host, which took a little longer than expected.
    The fix has worked and the Page Titles are correct now. I have also updated to version 2.0.0.63

    But I am still seeing a problem with the breadcrumbs where they only display ‘Home > Page’

    Is this also something that can be corrected?

    Best Regards
    Neil

    in reply to: Archive Page #493739

    Neil Hall
    Buyer
    Post count: 83

    Hi Alex

    I just wondered if any progress has been made on this problem yet.

    Best Regards
    Neil

    in reply to: Archive Page #492945

    Neil Hall
    Buyer
    Post count: 83
    This reply has been marked as private.
    in reply to: Archive Page #492847

    Neil Hall
    Buyer
    Post count: 83
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 83 total)