wpcrank_phil
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] “OR” as a keywordAlrighty, thanks much for your help. I don’t quite understand as can’t find any info on the ‘operator’ query_var, but that’s ok. It seems to be working as intended so I understand enough for now!
Thanks again.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] “OR” as a keywordThanks. I have this as the code now, which I think is what you were outlining…
add_filter('pre_get_posts', 'rlv_set_operator'); function rlv_set_operator( $query ) { if ( stripos( $query->query_vars['s'], " or " ) !== false ) { $query->set( 'operator', "OR" ); } }
I don’t quite understand what the $query->set(‘operator’, “OR”) part does or works as I don’t see any reference to an ‘operator’ in var_dump($query). Is it supposed to be ‘relationship’ or something perhaps?
Thanks again.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] “OR” as a keywordThanks for your quick reply. We bought the premium now for this purpose and quicker ‘did you mean?’ results. I’ll continue this convo here for continuity.
Now that we have premium, how do we go about ‘setting the operator query variable to “or” if the word “or” appears in the search query’? Not seeing any setting that would allow this nor any for more info in the docs.
Thanks much!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Custom fields to indexSorry for the delay but was able to zero in on the problem. Adding var_dump at top of relevanssi_tokenize() gives pretty much the same thing when the problem iteration goes through, https://screencast.com/t/uj9IarzgeV.
I hunted down though the particular call to relevanssi_tokenize() which was line 292 of indexing.php, https://screencast.com/t/VXo3hrHD98 and looked at which post_id was throwing the error and then went and looked at the ACF fields for that post which included a Relationship field that specifically gives the option to either return a Post ID or Post Object, https://screencast.com/t/xLOIhp6uMpG. This was set to Post Object in my case.
I changed it to Post ID as a test and the indexing was then able to process (well, at least until it hit the next Relationship field). There are other ACF fields that let you choose a Post Object as well. Not sure what the right answer is from here but that’s where its coming from anyway.
Thanks much and keep up the good work!
Philip
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Custom fields to indexThanks for your help Mikko.
It doesn’t fail on the first pass of that function, but the var_dump for the problem iteration can be seen here, https://screencast.com/t/Re2AsfnZ36. Not exactly sure how that object is getting in there, but this site did have a bunch of plugins before, a couple of them mention shortcodes in their description, Special Recent Posts PRO Edition, WP Compare Tables, and WP-Table Reloaded. The Post itself however has no shortcode and has been stripped down to just ‘test’ in the content, no custom fields or categories or anything.
For now, I’ve just added
if ( ! is_string( $a ) ) { return; }
to the top of the relevanssi_remove_punct function. This has the index building again, but obviously not the best solution for long-term.Does that help point you in the right direction?
Thanks again!
Philip
Hello again,
Had to put this down for awhile. I just need to put my own solution in place for this for now, client wants a lot of control over the og:images, selecting different options or specific images for each post.
The problem is that even with the Social Media module disabled I’m still getting several og:image tags showing up on the pages (inside the <alioseop comments, not a caching issue>. I’ve tried resaving the posts and disabling the plugin and reenabling. The tags go away when disabled so its coming from AIOSEOP. Plugin is updated to current version.
Further, I tried filtering them through the aiosp_opengraph_meta and echoing out all three vars each call to is is getting passed and there are two ‘thumbnail’ fields (values facebook/twitter), but no ‘images’, so I can’t filter them out or add my own in there.
Make sense? Any thought?
Thanks much!!!
Philip
Thanks for your help Michael. Much appreciated ??
I set it up though and echo’d out all the variables that are being passed to that function and there is only one image in there, yet the page has 5 in the code.
How do we override more than one?
Thanks again!
Philip
Thanks much for your help guys. I’m going to setup a duplicate site and see if I can figure it out more. Appreciate the pointers in some possible directions. I know I have pains with LastPass sometimes personally having to submit a couple times on WP logins.
Brian, the system does put them into the standard WP Users system / table. I’m wondering if it’s a caching plugin issue as well.
Thanks again, will keep digging!
Forum: Plugins
In reply to: [Search Everything] WordPress 4.2 WPtouch = brokenHas this been addressed? I’m having the same problem. Any help much appreciated.
Forum: Plugins
In reply to: [Gravity Forms: Multiple Form Instances] PHP and JS targetingThanks much for your help! That got me pointed in the right direction to get it figured out ??
Forum: Plugins
In reply to: [Gravity Forms: Multiple Form Instances] PHP and JS targetingDigging into this a little further. Seems the PHP will process ok, some voodoo magic is still passing the original form ID.
Still fighting the JS though. Looks like in the code there was a start of keeping the original form ID in a hidden field with the name of gform_field_values. It doesn’t look like that system is working though, no value is saved to the field. Maybe that part isn’t finished?
Thanks again
Forum: Plugins
In reply to: [Admin Menu Editor] Alter menu with PHPHm, weird, must have put it in wrong or something. Just resent with two addresses in it.
Thanks again!
Forum: Plugins
In reply to: [Admin Menu Editor] Alter menu with PHPThanks Janis. I’ve sent an email a few days ago for when you get a chance.
??
Forum: Plugins
In reply to: [Admin Menu Editor] Alter menu with PHPThanks for the quick reply. Still no luck though…
This…
function test_change_position($item) { if ($item['menu_title'] == 'Cases') { $item['position'] = 4; } return $item; } add_filter('custom_admin_menu', 'test_change_position');
Moved it into the right place if I ran another filter and print_r all the $items, but the actual menu didn’t change.
Kinda the same thing with custom_menu_order / menu_order…
function my_menu_order( $menu_order ) { pre($menu_order,0); return $menu_order; } add_filter( 'custom_menu_order', '__return_true'); add_filter( 'menu_order', 'my_menu_order' );
…actually showed the post_types where desired but the displays differently.
Maybe this is happening before AME? I tried 1/9999999 priorities. Perhaps there is a caching mechanism that I need to flush somehow?
Thanks again for your help,
Philip
Forum: Fixing WordPress
In reply to: Customizing Menu Sections in AdminThanks Mark,
Looks like my screencast didn’t keep – so question wasn’t clear. I’m actually talking about the different sections that you can add to a nav menu, by going to Appearance > Menus. Haven’t been able to find anything or anyway to tweak those.
Any ideas on that?
Philip