Last active
March 26, 2025 15:34
-
-
Save otakupahp/48f3b5d76f1283b99226b071ae378b36 to your computer and use it in GitHub Desktop.
Run Jetpack Instant Search locally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Replace table name as needed | |
| SELECT * FROM `wp_options` WHERE `option_name` LIKE '%jetpack_search%' ORDER BY option_name ASC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // If we are on localhost, force Jetpack online | |
| if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV ) { | |
| add_filter( 'jetpack_offline_mode', '__return_false' ); | |
| } |
Author
Thanks for the tip @verytwisty. It's very useful
Currently this only works locally for me if I add define( 'JETPACK_DEV_DEBUG', false ); to the wp-config file, incase anyone else is having trouble!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@otakupahp I have been using this on my current project!
I have a tip if you want to be able to style the JP related posts block on locally, you can do this:
This will give you some posts to work with...
Also if you want to modify the HTML output you can add this filter: