What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-23 07:30:31
gutenberg align full
<?php // INSIDE functions.php // Editor Full Width add_action('admin_head', 'editor_full_width_gutenberg'); function editor_full_width_gutenberg() { echo '<style> body.gutenberg-editor-page .editor-post-title__block, body.gutenberg-editor-p... Add solution -
PHP 2022-03-21 12:00:21
wp_schedule_event
register_activation_hook( __FILE__, 'my_activation' ); add_action( 'my_hourly_event', 'do_this_hourly' ); function my_activation() { wp_schedule_event( time(), 'hourly', 'my_hourly_event' ); } function do_this_hourly(... Add solution -
Javascript 2022-03-15 15:15:11
wordpress ajax url
<?php add_action( 'wp_footer', 'my_ajax_without_file' ); function my_ajax_without_file() { ?> <script type="text/javascript" > jQuery(document).ready(function($) { ajaxurl = '<?php echo admin_url( 'admin-ajax.ph... Add solution -
Other 2022-03-05 18:40:04
acf location field
// Method 1: Filter. function my_acf_google_map_api( $api ){ $api['key'] = 'xxx'; return $api; } add_filter('acf/fields/google_map/api', 'my_acf_google_map_api'); // Method 2: Setting. function my_acf_init() { acf_update_setting('google_api_k... Add solution -
Other 2022-02-28 01:15:38
mailchimp api to check a wordpress users subscription status
function get_subscriber_mailchimp_status($user_login, $user) {$api_key = 'mailchimp_api_key';$list_id = 'mailchimp_list_id';$us = 'mailchimp_us'; // eg, 'us5' or 'us7'$args = array( 'headers' => array( 'Authorization' => 'Basic ' . base6... Add solution -
PHP 2022-02-26 18:05:14
custom post type with taxonomy
//hook into the init action and call create_book_taxonomies when it fires add_action( 'init', 'create_topics_hierarchical_taxonomy', 0 ); //create a custom taxonomy name it topics for your posts function create_topics_hierarchical_taxonomy() { // Ad... Add solution
Best helpers
Ranking is empty