My pagination creates a redirect

You can remove the trailing slash from the pagination links by adding untrailingslashit() function as callback for paginate_links filter. Put this code in your theme’s functions.php or in an mu-plugin (untested): add_filter( ‘paginate_links’, ‘untrailingslashit’ );

Unable to add blocks in wordpress posts

Your editor is in code/text mode. It’s possibly this is because you turned it off in your profile edit screen. Its also possible it’s because you selected code editor in the options menu in the top right corner. It’s also possible you have JS errors in your browser console that are preventing the block editor … Read more

contact form 7 form not working in admin panel

The action wp_enqueue_scripts action hook is only on the frontend: try changing this to admin_enqueue_scripts for the admin (untested): add_action( ‘admin_enqueue_scripts’, ‘cf7_script_and_style’ ); Edit: After looking at the definition for wpcf7_enqueue_scripts(), it turns out that CF7 doesn’t anticipate being loaded in the admin: who would’ve guessed. You’ll need to copy a lot of that file … Read more

Optimizing or rewriting core queries

You could certainly write a wrapper function that implements caching of the WooCommerce core functionality, but WooCommerce isn’t going to use your wrapper function, so pretty pointless. Your best option is to create and use your own data store for WooCommerce that extends the WC_Data_Store_WP class, and add caching to those functions.

Detecting whenever a user types – in the Gutenberg editor, and checking if there is a preceding or succeeding – then converting both to an em dash

I managed to find an answer to this. Instead of adding an event listener to the editor, I hooked some additional functionality onto Gutenberg’s Autocompleter instead: I wrote a post here detailing how I did this, if anyone is looking to do the same thing: https://blog.terresquall.com/2023/06/how-i-made-double-dashes-automatically-convert-to-em-dashes-in-wordpress-gutenberg-editor/

website not indexed

If you go to example.com/robots.txt, that will show you the directives for search engine bots. You can also check the meta tags on individual pages to see if they’re being blocked. Best option would be Google Search Console’s URL Inspection Tool. If the URL Inspection tool does not explain why the page is not being … Read more