Category: Admin
Add ‘Internal Name (Nickname) Entry Field to WP Admin ‘Add New User’ Screen
// Inject Nickname and Company fields into Add New User screen add_action(‘user_new_form’, function($form_type) { if ($form_type !== ‘add-new-user’) return; ?>Continue reading
Hide Website Entry Field from WP Admin ‘Add New User’ Screen
add_action(‘admin_footer-user-new.php’, function() { ?>Continue reading
Feed Generation Cron Script
Fetch and Display AIOSEO Meta Data for a Specific Post
/** * WPCode Snippet: Display AIOSEO Meta Data for Post ID 323 * */ add_filter(‘the_content’, function($content) { // Only show on single post/page and for post ID 323 if (!is_singular() || get_the_ID() != 323) { return $content; } if (!function_exists(‘aioseo’))…Continue reading
wrong redirect .htaccess
# Slash al final RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !# RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ https://yourdomain.com/$1/ [L,R=301] # END Slash al finalContinue reading
Untitled Snippet
Hide Theme Footer Notice in Selected Admin Areas
add_action(‘admin_head’, function () { echo ‘ ‘; });Continue reading
Remove Specific Campaign Based on the Referral URL- v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID-holder’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading
Remove Specific Campaign Based on the Referral URL-v1
document.addEventListener(‘om.Campaign.startShow’, function(event) { if(document.referrer.search.indexOf(‘google.com’) > 0) { // replace with the specific referral domain var optinCampaign = document.querySelector(‘#om-CAMPAIGN_ID’); // replace CAMPAIGN_ID with the unique ID for your campaign optinCampaign.parentNode.removeChild(optinCampaign); } });Continue reading