Modifying date filter on admin page for custom post type to link to custom field

Apologies if a similar question has already been asked, but I can’t seem to find the exact functionality I am looking for. Basically I have a custom post type (sermons) which has ‘recorded_date’ as a custom meta data field. What I would like to do is on the custom post admin page (where all posts are shown) is change the existing date filter action to filter by this ‘recorded_date’ field and not the post_date as it normally does. I’ve managed to change the date filter dropdown using the following: add_filter(‘months_dropdown_results’,…

Augmenter la taille maximum d’importation sous phpMyAdmin

J’ai récemment eu le besoin de changer la taille limite d’importation d’un fichier SQL sous phpMyAdmin 4.1.14 livré avec WampServer 2.5. Pour cela j’ai donc fait comme d’habitude. J’ai ouvert mon fichier php.ini, et j’ai recherché les directives upload_max_filesize et post_max_size. Ces directives permettent de gérer la limite en octets des fichiers chargés, ainsi que… Source: https://www.djwebcreator.fr/feed/

Using wp_tag_cloud with only current post tag with special class

I am trying to output all the tags (custom taxonomy) without link, and add special class to current post tags. For example: if there are 10 tags but current post has 3 of them applied, then it should display all the 10 tags without link but only 3 tags should have special class. I am currently using: $terms = get_the_terms( $post->ID, $tax ); $tag_list = implode(‘,’, wp_list_pluck($terms, ‘term_id’) ); wp_tag_cloud( array( ‘taxonomy’ => $tax, ‘include’ => $tag_list) ); which is just showing tags with link for current post. Source:…

Web Design Weekly #187

Headlines Tooling is Not the Problem of the Web Sebastian Markbåge expresses his frustration with various people stating that the web platform is good enough but people are just not smart / educated enough to use it. Interesting read. (medium.com) Choosing Performance (timkadlec.com) Don’t miss your last chance! Join us at the final HybridConf. HybridConf is the conference where products, businesses and friends are made. Learn from our awesome lineup of speakers talking real world issues in a welcoming atmosphere where there are no VIPs – everyone is equal, whatever…

custom metabox nonce verification fails

I’m adding a metabox on a custom post type and my nonce-verification fails. I’m not really where to look for why it’s going wrong. Can anyone point me in the right direction? Here’s my code: function myplugin_add_metabox() { add_meta_box( ‘myplugin_box’, // $id ‘Some Title’, // $title ‘myplugin_box’, // $callback ‘custom_post_type’, // $page ‘normal’, // $context ‘high’); // $priority } add_action(‘add_meta_boxes’, ‘myplugin_add_metabox’); function myplugin_box() { echo ‘<input type= »hidden » name= »myplugin_nonce » value= »‘.wp_create_nonce(basename(__FILE__)).' » />’; } function myplugin_save_box() { // verify nonce if (!wp_verify_nonce($_POST[‘myplugin_nonce’], basename(__FILE__))) { error_log(« nonce verification failed », 0); return $post_id; } error_log(« nonce worked »,…

Front-end Ajax File Upload

I’m working on a project where registred users can upload file to a specific post type. For a more fluid navigation, I’m making this whole part with Ajax, so the page never reloads. However I’m having a hard time trying to make a <input type= »file »> work. Here’s my code so far: Markup <?php // Start Loop and current meta of the post ?> <form class= »update_post » method= »post » accept-charset= »utf-8″ enctype= »multipart/form-data »> <input type= »hidden » name= »post_id » id= »post_id » value= »<?php echo get_the_ID(); ?> »> <label for= »new_value_1_for_<?php echo get_the_ID(); ?> »>Value 1</label> <input type= »text » name= »new_value_1_for_<?php echo get_the_ID(); ?> » id= »new_value_1_for_<?php echo…

Web Design Weekly #186

Headlines Is Mobile Friendly “Friendly” Enough? Just because a site is mobile friendly in the sense of design, it may not be mobile friendly in the sense of data/network usage. Matt Shull shares some insights on how to rectify that. (webperformance.io) io.js is merging back into node (github.com) See how your Visitors are really using your Website Hotjar is a new and affordable way to improve your site UX and conversion rate by using >> Heatmaps, Visitor Recordings, Funnel and Form Analysis, Polls and Surveys… all in one central interface.…

How to not display a category post on blog page?

As you know, we can assign a « Category » to any post we write. We can also use a « Category » as link on the menu. Good! By default, WordPress will display all your posts in all the categories on your front page. However, how to prevent WordPress displaying a « Category » type on the front page? Example, I have a post with a category name « Football ». I don’t want all posts with this category to be displayed on the front page, how to do that? I will access it only on the…