Skip to content

Instantly share code, notes, and snippets.

View cre8tivediva's full-sized avatar

Anita cre8tivediva

  • 00:24 (UTC -04:00)
View GitHub Profile
@cre8tivediva
cre8tivediva / snippets.php
Created September 3, 2026 01:01
Popup Maker - Hide Logo on Plugins Page
/**
* Popup Maker - Hide Logo on Plugins Page
*/
add_action( 'admin_head-plugins.php', function() {
?>
<style>
.pum-plugin-icon {
display: none !important;
}
@cre8tivediva
cre8tivediva / browser-console
Last active May 28, 2026 12:09
Fix Kadence / Liquid Web Broken Images
/* Create a new bookmark in your browser. Name it Fix Kadence Images. Then take line 4 and copy/paste it in the URL of the bookmark then save it. Then add the bookmark to your Bookmark toolbar. To execute it, go to a support document where images do not appear > click your bookmark and you should see the images. See video here: https://app.screencast.com/2vHkiwKUcJpUL
javascript:(()=>{document.querySelectorAll('img').forEach(img=>{function r(url){return url?url.replace(/^https?:\/\/(?:www\.)?liquidweb\.com/i,'https://www.kadencewp.com'):url}['src','data-src'].forEach(attr=>{if(img.hasAttribute(attr)){img.setAttribute(attr,r(img.getAttribute(attr)))}});if(img.hasAttribute('srcset')){img.setAttribute('srcset',img.getAttribute('srcset').split(',').map(item=>{const parts=item.trim().split(/\s+/);parts[0]=r(parts[0]);return parts.join(' ')}).join(', '))}});})();
@cre8tivediva
cre8tivediva / kadence-legacy-docs-finder.html
Last active May 28, 2026 15:31
KadenceWP Legacy Documentation Finder
<!-- KadenceWP Legacy Documentation Finder | Temporary Resource for Missing/Migrating Liquid Web Docs -->
<!-- KadenceWP Old Docs Sitemap Index - Create a new page and drop this in a Custom HTML Block Version -->
<style>
:root {
--kadence-blue: #404963;
--kadence-bg: #f7f7f5;
--kadence-border: #d9d9d9;
--kadence-text: #242424;
}
@cre8tivediva
cre8tivediva / functions.php
Created March 29, 2026 19:59
Temporary Fix: Product Block Title block renders current page/post title on frontend when used in regular post content
// Temporary fix for the Product Block Title so the Product Title will display instead of the Post Title. Bug report sent: https://github.com/woocommerce/woocommerce/issues/63799
add_action( 'template_redirect', function() {
if ( is_admin() || wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) {
return;
}
if ( ! is_singular() ) {
return;
}
@cre8tivediva
cre8tivediva / functions.php
Last active August 30, 2025 12:58
Add Online Status Indicate to User Screen in WordPress
// From ChatGPT on 8/29/2025 but updated 8/30/2025
// Check if an admin has an active session
function rtd_is_admin_online($user_id) {
if (!user_can($user_id, 'administrator')) {
return false;
}
if (!class_exists('WP_Session_Tokens')) {
return false; // safety check
@cre8tivediva
cre8tivediva / functions.php
Created June 12, 2025 11:15
Add Reusable Blocks to WordPress
/**
* Reusable Blocks accessible in backend
* @link https://www.billerickson.net/reusable-blocks-accessible-in-wordpress-admin-area
*
*/
function be_reusable_blocks_admin_menu() {
add_menu_page( 'Reusable Blocks', 'Reusable Blocks', 'edit_posts', 'edit.php?post_type=wp_block', '', 'dashicons-editor-table', 22 );
}
add_action( 'admin_menu', 'be_reusable_blocks_admin_menu' );
@cre8tivediva
cre8tivediva / functions.php
Created March 24, 2025 18:48
// Add post navigation to CPT in Kadence - change portfolio to your CPT name
// Add post navigation to CPT in Kadence - change portfolio to your CPT name
add_action( 'kadence_single_after_inner_content', 'add_post_nav_to_specific_cpt' );
function add_post_nav_to_specific_cpt() {
if ( is_singular( 'portfolio' ) ) {
echo '<div class="cpt-post-nav">';
the_post_navigation( array(
'prev_text' => '&laquo; %title',
'next_text' => '%title &raquo;',
) );
@cre8tivediva
cre8tivediva / functions.php
Created September 10, 2024 17:04
Make forward facing links clickable (WordPress)
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Make forward facing links clickable
//* https://developer.wordpress.org/reference/functions/make_clickable/
add_filter( 'the_content', 'make_clickable' );
@cre8tivediva
cre8tivediva / functions.php
Created May 31, 2024 18:06
Inject Genesis SEO title and meta description into WooCommerce Shop page
// By default, when using Genesis' SEO settings (not a plugin like Yoast or Rankmath), the title and meta description will not show up and will not display the new title name on the browser tab. Code provided by ChatGPT, tested and works.
// Inject Genesis SEO title and meta description into WooCommerce Shop page
add_action('wp_head', 'custom_shop_page_meta', 1);
function custom_shop_page_meta() {
if (is_shop()) {
$shop_page_id = wc_get_page_id('shop');
// Retrieve Genesis title and meta description
$shop_title = get_post_meta($shop_page_id, '_genesis_title', true);
@cre8tivediva
cre8tivediva / functions.php
Created October 14, 2023 14:00
Change the logo and url on the login page
// Update the login logo with the custom header image
function custom_login_logo() {
// Get the header image from the Customizer
$header_image = get_header_image();
if (!$header_image) {
return;
}
// Styles to replace the WordPress logo with the custom header image