Skip to content

Instantly share code, notes, and snippets.

@foulegold
foulegold / optimizing-wordpress-search-functionality.md
Created September 24, 2024 02:40
Discover tips and tools for improving WordPress search functionality and boosting search speed. Enhance user experience with effective search solutions.

Optimizing WordPress Search Functionality: Tips and Tools for Improving the Default Search Capabilities

Efficient search facilities are a must on your WordPress site in this whole digital era when users expect information in seconds, the least. These good features ensure a greatly improved user experience in terms of engagement and retention. To do that, you have to be able to extend beyond the default search capabilities provided by WordPress. Herein, we look into some tips and tools whereby one is able to Boost Your WordPress Search Speed, hence boosting general search functionality.

Understanding Limitations of the Default WordPress Search

Where WordPress is enormously powerful, its out-of-the-box search functionality has a number of frustrating limitations that it searches post titles and content; often doesn't even look at custom post types, metadata, and comments. This leads to incomplete results, frustrated users, and ultimately abandoned sites.

![wp-sear

@Acephalia
Acephalia / wpcitwebp.php
Last active May 23, 2025 22:31
Wordpress Convert Image To WebP and Delete Original File On Upload
//Convert uploaded files to webp and delete uploaded file. Imagick needs to be enabled. This can be done via the php config settings in your servers control panel.
function compress_and_convert_images_to_webp($file) {
// Check if file type is supported
$supported_types = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];
if (!in_array($file['type'], $supported_types)) {
return $file;
}
// Check if file is already a WebP image
@bhdd
bhdd / gulpfile.js
Last active October 5, 2023 16:33
Updated Sage 8.6.0 build files
// ## Globals
var argv = require('minimist')(process.argv.slice(2));
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
var changed = require('gulp-changed');
var concat = require('gulp-concat');
var flatten = require('gulp-flatten');
var gulp = require('gulp');
var gulpif = require('gulp-if');
var imagemin = require('gulp-imagemin');
@Danushka181
Danushka181 / woocommerce-functions.php
Created November 30, 2021 19:05
woocommerce functions hooks
<?php
/**
* WooCommerce Template
*
* Functions for the templating system.
*
* @package WooCommerce\Functions
* @version 2.5.0
*/
@koraysels
koraysels / TRELLIS setup local + digialocean.md
Last active February 12, 2025 17:57
Use Trellis to deploy to digitalocean droplet
# install vagrant
brew install --cask vagrant

# install ansible
brew install ansible 
brew install esolitos/ipa/sshpass

# install virtualbox but make sure it is virtualbox v6.1.26 
@WProbot
WProbot / import-optimizations.md
Created April 20, 2021 20:14 — forked from trey8611/import-optimizations.md
WP All Import - Optimize your import speed.
@random-robbie
random-robbie / shell_exec.txt
Created March 25, 2020 14:20
wordpress plugins with shell_exec in them.
10web-manager
4k-icon-fonts-for-visual-composer
accelerated-mobile-pages
accept-payments-wp
accu-auto-backup
ace-edit
ace-editor-for-wp
aceide
acelerator
acf-code-field
@Jahid07
Jahid07 / custom-metabox.php
Last active May 1, 2020 00:02
WordPress custom metabox for custom post type
/**
* Contact meta boxex
* Custom post type name is "prefix-contact"
*/
function prefix_contact_add_meta_box()
{
add_meta_box( 'contact_email', 'User Email', 'prefix_contact_email_callback', 'prefix-contact', 'side', 'low');
}
@jsnelders
jsnelders / wordpress_export_to_json.php
Last active November 15, 2024 14:16
Export all core WordPress data (posts, pages, attachments, comments, tags, categories and users) to a JSON formatted file.
<?php
/**
* Plugin Name: WordPress Export to JSON
* Plugin URI: https://jsnelders.com/
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file.
* Author: Jason Snelders
* Author URI: http://jsnelders.com
* Version: 2020-01-30.1
**/
@ozknozsrt
ozknozsrt / app.js
Last active January 16, 2024 16:48 — forked from itzikbenh/app.js
WordPress API - how to fetch and paginate posts with Vue.js
import Vue from 'vue';
import posts from './components/posts.vue';
window.axios = require('axios');
window.Vue = Vue;
Vue.component('posts', posts);
const app = new Vue({
el: '#app',