Andy Macaulay-Brook
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Store Locator] Trigger search with location dropdownHi, My skills just aren’t up to seeing whether I could have accessed the right object from my theme JS, especially with the plugin code minified, so I reluctantly edited the plugin as you suggested.
So adding:
$( "#wpsl-search-btn" ).trigger( "click" );
after line 200 of wpsl-gmap.js worked.
So, yes please, if this could become an option within the plugin then that would be fantastic.
- This reply was modified 7 years, 2 months ago by Andy Macaulay-Brook. Reason: Mark the code as code
Forum: Plugins
In reply to: [WP Store Locator] Spinner overlaying Searching textPerfect, thanks.
Forum: Plugins
In reply to: [WP Store Locator] Spinner overlaying Searching textJust to add: I’ve restyled the
<li>
elements in the results, reducing the left padding to add a border to the left of each store address and I suspect this is the problem.I see that the No Results message sits in one of these
<li>
s and so I presume that the Searching is the same. If the classes used on all these elements were in the documentation then that would be a great help when restyling.So I guess I just need help with the class(es) applied here while waiting for the search to complete?
Thanks.
Forum: Plugins
In reply to: [WP Store Locator] Custom CSV import that I don’t think the add-on supportsJust to add that this worked perfectly.
Forum: Plugins
In reply to: [WP Store Locator] Trigger search with location dropdownThanks for the pointer – I’ll try it out and see if I can get it working with my theme code so I don’t modify the plugin at all.
Forum: Plugins
In reply to: [WP Store Locator] Custom CSV import that I don’t think the add-on supportsThat’s great, thanks!
Forum: Plugins
In reply to: [WP Store Locator] Is the map optional?Thanks – yes, I guess that’s what I meant, does the code expect it in my template. I’ll just hide it.
Thanks for the quick response.
Forum: Plugins
In reply to: [Attachments] DB search and replace not effective on attachments dataIf you can save me a little time by telling which table and fields to look at, I’ll try and run a couple of tests next week. On a deadline this week.
Andy.
Forum: Plugins
In reply to: [Attachments] DB search and replace not effective on attachments dataNow there’s a question. A quick Google turns up these…
https://github.com/interconnectit/Search-Replace-DB/pull/62 (this is the WP-CLI plugin for DB search and replace) is titled “Added support for replacing cells serialized via json/encode64”
https://pantheon.io/blog/wordpress-quick-tip-search-and-replace-wp-cli says “and WP-CLI knows how to unpack JSON payloads stored in your DB, perform the search and replace on them, and then if changed, re-pack them and update the database”
The WP CLI docs for search and replace (https://wp-cli.org/commands/search-replace/) state “It will correctly handle serialized values, and will not change primary key values.”
I don’t know enough (yet) about how JSON gets stored to tell whether these references imply that S&R should succeed or not.
A.
Forum: Plugins
In reply to: [Attachments] Caption isn't actual Attachment Caption?Ah – that makes sense now – maybe the documentation could make it a little clearer?
Forum: Plugins
In reply to: [Attachments] Change layout of meta boxI’ve been thinking the same. It would be great to have another layout when the instance uses only the attachment and no other fields. A grid of thumbnails that can still be dragged and dropped into order would be good.
Fantastic plugin, by the way. I’ve started using it for all my slideshows as well as any page layouts where the imagery needs special handling.
The hack/fix in this support question fixes this problem
Hi Pat – would you mind sharing your code? Thanks.
[More haste, less speed – I realised after posting this that I hadn’t activated any components in the Settings menu. When I do this, the plugin works fine in 3.1 for me.]
Forum: Plugins
In reply to: post_type_link filter working but returns 404Don’t know if this is the cause, but your add_filter call specifies 3 parameters and your function only takes 2.
If you look at the WordPress source, this filter takes 4 parameters.
The docs for add_filter suggest that it does little or no error checking for performance reasons, so it might just be silently trying (& failing) to cope with the mismatch.
Forum: Plugins
In reply to: Using Custom ‘post_type’Justin Tadlock points out that that you can add post types into the query by hooking into the pre_get_posts filter hook and running something like $query->set( ‘post_type’, array( ‘post’, ‘page’, ‘classified’, ‘attachment’ ) );
So to include posts of type classified mixed with ‘normal’ posts, I use this:
function my_get_posts( $query ) { if ( is_home() || is_single() ) $query->set( 'post_type', array( 'post', 'classified' ) ); return $query; } add_filter( 'pre_get_posts', 'my_get_posts' );
So far I’m only assuming that this will still work when I build in my own template & query vars.