Neil Hall
Forum Replies Created
-
AuthorPosts
-
Hi Paolo
I have managed to sort out the problem with the Menu Permalinks, and hopefully it is working correctly now.
With regard to the SSL, Could you let me know which browser you are working with. We have tried it with several browsers and mobile devices and we do not seem to be getting an error.
Many thanks
NeilHi Stofian
I added the code to my functions.php and gave it a quick test. It appears to work only with the image slider on the listing-detail page. Is this correct?
In these images I saw it changes the image meta title to the post title, and also the Alt text to the image title, which is a good start.
What would be nice is if you could add additional text to the Alt text. For example ‘Check out the latest reviews on ‘post title”. Would something like that be possible tooAnd following on from this if this function could be extended to the widget-listing-listview.php and listing-listview.php it would be great.
Best Regards
NeilHi Stiofan
Was the “geodir_get_images_arr” filter added in version 1.6.20. If it was how do I use it.
Best Regards
NeilHi Kiran
Many thanks for your help and the explanation. We have modified the way that we use tags so we do not see this problem anymore.
Best Regards
NeilHi Kiran
Thank you for your explanation, but I don’t understand why you are doing a validation on the Listing name against the category/tag.
From my perception (which may be wrong) the Listing title windsor-castle is actually stored in wp_posts as the ‘post_name’, where windsor-castle as a category/tags are in wp_terms as the ‘slug’. The two are quite separate and can be accessed in different ways.
Can you explain where this becomes a problem as I can’t think of anywhere that this would cause an issue. This has obviously done for some reason and I realize the Geodirectory is very complex with a multitude of functions that I may not be using
Even if the validation is truly needed it does not make any sense to change the permalink of an existing post when it is edited. My feeling is that this should be constant. Could this be fixed?
Alternatively, is there a way that I can turn this validation off?
Best Regards
NeilThis reply has been marked as private.Hi Paolo
I’m not sure why you are getting that message. I have disabled the translation plugin. But the problem is still there. I do not believe it is the translation program as this was working fine with version 1.6.19.
Would you like to try and login again to see if it works.
Best Regards
NeilThis reply has been marked as private.Hi Stiofan
I think I have managed to solve the ‘alt’ and ‘title’ for the images that are displayed in the widget-listing-listview.php and the listing-listview.php where the geodir-post-img is found. I’m sure there must be a better way of doing it but I edited the post_functions.php near line 1636 to this:
$image_alt = get_the_title($post->ID); $image_title = get_the_title($post->ID); if (is_admin() && !isset($_REQUEST['geodir_ajax'])){ $html = '<div class="geodir_thumbnail"><img style="max-height:' . $max_size->h . 'px;" alt="place image" src="' . $image->src . '" /></div>'; } else { if($size=='widget-thumb' || !get_option('geodir_lazy_load',1)){ $html = '<div class="geodir_thumbnail" style="background-image:url(\'' . $image->src . '\');" alt="place image"></div>'; }else{ //$html = '<div class="geodir_thumbnail" style="background-image:url(\'' . $image->src . '\');"></div>'; //$html = '<div data-src="'.$image->src.'" class="geodir_thumbnail" ></div>'; $html = '<div data-src="'.str_replace(' ','%20',$image->src).'" class="geodir_thumbnail geodir_lazy_load_thumbnail" alt="Latest reviews on '.$image_alt.'" title="'.$image_title.'"></div>'; } }
I just need to crack the listing-detail.php
Best Regards
NeilHi Stofian
If you mean the images in the slider on the listing-detail.php then yes that would be very useful.
I also want to set the title and image withing the widget-listing-listview.php and the listing-listview.php where the geodir-post-img is found
Best Regards
NeilHi Paolo
Many thanks. I’ll be very interested if there is a solution
Best Regards
NeilHi Stiofan
I am testing in the listing-detail page within the Map tab.
In the tests that I am running, which are with the place cpt the main category ‘Places to Visit’ has ID 15. Sub-categories that I have tested have id’s of 262, 267, 712 etc.
As I said, the code does work in the front end when posting listings. The only problem seems to be when the listing is either approved or updated in the backend.
Let me know if you need any further info.
Best Regards
NeilHi Stiofan
That seems to work in the same way. So if the Listing is automatically published then it has the correct icon.
However, as soon as I go to the listing in the backend and then update it (without changing anything) then it selects the icon from the main category.
Again, if I deselect all the categories in the backend and just select the sub-category before I press the update button, then it uses the correct ‘sub-category’ icon.
Best Regards
NeilHi Stiofan
Thank you for the code. I have run a few tests.
If I set the GD>Design>Listings> New listing default status to ‘Publish’ then it works really great and the correct icon is published on the Map.
However, if the above setting is set to ‘Draft’ (which is how we would ideally like it) and the Listing is manually published in the backend then it reverts back to the main-cat icon.
I did find a way around this in the backend by deleting the categories and just clicking on a sub-cat before clicking on the publish button which then gives the correct result. But if you have another solution that would work when the post is published in the backend it would really help.
Best Regards
NeilHi Stiofan
We have over 20 cpt’s all with a varying amount of sub-categories, so it may be difficult.
However, th way that we have set them all up means that the sub-category id is always higher than the main-category id.
Is there any way that we could change the code somewhere so it took the highest id instead of taking the lowest id?
Best Regards
Neil -
AuthorPosts