Category: Admin
om-embed-code-example.js
archive-listings.php
Property ListingsContinue reading
functions.php (copy)
jQuery(function($) { $(document).on(‘click’, ‘.favorite-toggle’, function(e) { e.preventDefault(); const btn = $(this); const post_id = btn.data(‘post-id’); const isFavorited = btn.attr(‘data-favorited’) === ‘1’; $.post(”, { action: ‘toggle_favorite’, post_id: post_id }, function(response) { if (response.success) { btn.text(isFavorited ? ‘♡’ : ‘❤️’).attr(‘data-favorited’, isFavorited ?…Continue reading
functions.php
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