Skip to content

Instantly share code, notes, and snippets.

@XavierRheem
XavierRheem / acf_custom_search.php
Created January 31, 2024 19:55 — forked from wking-io/acf_custom_search.php
How to search a specific custom post type and the ACF fields within
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* This could easily be something that is added to the admin as a plugin so that users can
* add searchable fields in an options table
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
@XavierRheem
XavierRheem / custom-queries.php
Created January 23, 2024 01:35 — forked from carlodaniele/custom-queries.php
An example plugin showing how to add custom query vars, rewrite tags and rewrite rules to WordPress
<?php
/**
* @package Custom_queries
* @version 1.0
*/
/*
Plugin Name: Custom queries
Plugin URI: http://wordpress.org/extend/plugins/#
Description: This is an example plugin
Author: Carlo Daniele
@XavierRheem
XavierRheem / make-pot.sh
Created April 12, 2023 15:38 — forked from UVLabs/make-pot.sh
Using WordPress makepot.php to generate pot file used for the internationalization of your plugin or theme.
#!/bin/bash
php path/to/makepot.php wp-plugin /path/to/your/plugin pluginname.pot
#php path/to/makepot.php wp-theme /path/to/your/theme themename.pot