A collection of (mostly) WordPress-related snippets and references I’ve found useful and worth keeping where I can find them. Feel free to use what you like, and point me to some better snippets or references.
Remove Registration Link from Login Page»
If you want to control how users register for a member site, it's a good idea to remove the registration link on on the login screen.
Users | Type: PHP
Remove User Personal Options»
Remove some of the clutter of user options.
Custom Admin, Users | Type: PHP
Remove Yoast Columns to Allow WooCommerce Columns»
Yoast SEO knocks all the products admin pages out due to the way it adds a load of columns to the list.
¡Important!, eCommerce, Yoast | Type: PHP
Removing autop, and when you can’t remove it»
The autop function can be very annoying when you’re trying to format content. But some plugins depend on autop to work, such as the checkout function in EDD, and possibly…
eCommerce, PHP, WP/CP | Type: PHP
Rendering a Readable Date from Start Date»
$mtgdate = DateTime::createFromFormat('Ymd', $startdate)->format('F j, Y'); echo '<p class="read-more"><a href="'.$formurl.'?mtgdate='.$mtgdate.'">'.$linktext.'</a></p>';
Date/Time, Forms, PHP | Type: PHP
Replace Deprecated Init create_function (php 7.2)»
Several plugins still use the deprecated function. EXAMPLE (SSN) //deprecated version add_action('widgets_init', create_function('', 'return register_widget("SimpleSectionNav");')); //7.2 ready version function ssn_register_widget() { return register_widget("SimpleSectionNav"); } add_action( 'widgets_init', 'ssn_register_widget' ); EXAMPLE //deprecated…
PHP, WP/CP | Type: PHP
Responsive Data Tables»
Brilliant responsive trick for data tables, when you have no choice but to use them.
CSS, Responsive, Tables | Type: CSS
Responsive Embedding»
Website app generates responsive embedding code for all types of media, including generic iframes.
Media | Type: Other
Responsive jQuery Accordions (vertical expansion)»
Nice responsive accordian.
CSS, jQuery, Responsive | Type: Javascript
Responsive Table 2»
View at link at bottom. This table does not show active CSS and javascript.
CSS, Javascript, Responsive, Tables | Type: CSS