Mitch Canton
Forum Replies Created
-
AuthorPosts
-
Hi Alex,
1) if you mean like in templates>listing-detail.php no changes
or if in design>detail tab in settings no changes2) the customization I spoke of is:
add_filter('geodir_tab_show_geodir_association','my_enable_shortcodes_on_field',10,2); function my_enable_shortcodes_on_field($html, $variables_array){ return apply_filters('the_content', $html); }
which allows shortcode to work in a pagetab called ‘association’
But it is not only the ‘association’ tab that is not working (although it has worked for a year+), the Related Listings tab does not show (even though it is set to show on that package level).
And it doesn’t explain why if I go in and edit the listing to change the category, it works, then to not work again upon any other edit.
Nada, that destroyed the page layout. (attached).
Could it be something to do with it being a staging site? I can’t think of anything else. Another non-staging dev site with this same theme and plugin stack (and with the original WPGD custom code) doesn’t have this issue. But I’m concerned about moving the ‘real’ site mods from staging to the real production site because of this issue showing up on staging.
This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.The code snippet is part of a custom plugin where I compile all my WPGD related custom code. It is simply another plugin on the site: “GeoDirectory custom CCL.” You can see it in the admin > plugins.
The interesting part is that I have the exact code in the WPGD custom plugin on both sites.
I will also drop FTP creds in the next message so you can see it there.
Thanks.
Still at this. I’ve tried a dozen different variations of theme functions and file tweaks, but I still have it only partially working. Have same themes now and same plugin stack. Plus I have exactly replicated code in the WPGD custom plugin of the two sites. Have got it to *partially* work. Here’s where I’m at:
The site that is working (showing the pkg-id) has the ‘sort’ and ‘view’ boxes separate; where the site that is not working has them together (but on the lower portion).
(see screencaps)Also in looking at dev tools, both sites have the pkg-id working on the top (Featured) but the broken site has some ‘geo-tax-sort’ class and then the listings below that do not work (for pkg-id).
(see screencaps).The WPGD Place Settings are the same (for sort, etc).
Maybe the screencaps will have something jump out.
Thanks for any direction to resolve.
Thank you very much for the code mods. I hate to say it, but it did not resolve the issue.
In working on it more, I do see something that might be related. Last year, I was given some code to add a grouping of “Featured” listings above the main listings. It looks as though the Featured grouping DOES have the pkg-id, but the main listings do NOT. Here is the code for that and the new:
add_action('geodir_before_listing','_my_listings_top'); function _my_listings_top(){ global $wp_query; $current_term = $wp_query->get_queried_object(); $cat_id = isset($current_term->term_id) ? $current_term->term_id :''; $post_type = geodir_get_current_posttype() ? geodir_get_current_posttype() : 'gd_place'; $output = do_shortcode('[gd_listings post_type="'.$post_type.'" layout="4" character_count="140" category="'.$cat_id.'" post_number="10" list_sort="az" show_featured_only="1"]'); if (strpos($output, 'no-listing') === false) { echo "<h3>Featured GoLocal Listings</h3>"; echo $output; echo "<hr /><h3>More GoLocal Listings</h3><br />"; } } // add the package id to the body add_filter( 'body_class', 'my_add_package_class',10,1 ); function my_add_package_class($class){ global $post; $package_id = isset($post->package_id) ? $post->package_id :geodir_get_post_meta($post->ID, 'package_id', true); if (geodir_is_page('detail') && isset($package_id)) { $class[] = "gd-package-id-".$package_id; } return $class; }
Is it possible the ‘Featured’ code I was given now conflicts with the ability to pull package id in the rest of the listings?
Thanks.
This reply has been marked as private.This reply has been marked as private.Hey Alex,
Yeah, I checked, and that code IS still in the WPGD custom plugin.
I also *added* it to the theme functions.php file directly. Now here’s something interesting. I left it active in the custom plugin as well, and it crashed the site (as expected *if* two of the same code is active). So the site IS seeing it.
I then removed it from the custom plugin, just leaving it in the theme directly, and the site came back (as expected) BUT the code was still not applying.
It’s strange. What should I try next?
Thanks.
This reply has been marked as private.Fantastic. I’ve reviewed and it works here. Thank you.
It’s interesting that it only recently became an issue. And on our other site, we have a nearly identical setup, and this problem never materialized?
Again, thanks for superior support.
This reply has been marked as private.here is one – of many 🙂
https://clarkcountylive.com/go-local/banks-credit-unions/twinstar-credit-union-hazel-dell/#post_map
Thanks.
-
AuthorPosts