add_action(‘add_meta_boxes’, function() { add_meta_box( ‘custom-logo-metabox’, ‘Custom Logo’, function($post) { // Add a nonce field so we can check for it later wp_nonce_field(‘custom_logo_meta_box’, ‘custom_logo_meta_box_nonce’); // Retrieve the existing value from the database $custom_logo_id = get_post_meta($post->ID, ‘_custom_logo_id’, true); $custom_logo_url = $custom_logo_id ?…Continue reading
/** * Import an entire folder from a plugin into the WordPress theme. * * @param string $plugin_folder Plugin folder path. * @param string $theme_folder Theme folder path. * * @return bool True on success, false on failure. */ function…Continue reading
add_editor_style( ‘style-editor.css’ ); add_theme_support( ‘appearance-tools’ ); add_theme_support( ‘align-wide’ ); add_theme_support( ‘responsive-embeds’ ); add_theme_support( ‘post-formats’, array( ‘aside’, ‘gallery’, ‘link’, ‘image’, ‘quote’, ‘status’, ‘video’, ‘audio’, ‘chat’ ) // WordPress supports the following post formats. These formats cannot be changed by the average…Continue reading
// Skip show library screen add_filter( ‘wpcode_add_snippet_show_library’, ‘__return_false’ ); // Move status column add_filter( ‘wpcode_code_snippets_table_columns’, function ( $columns ) { if ( isset( $columns[‘status’] ) ) { $status = $columns[‘status’]; unset( $columns[‘status’] ); $columns = array_slice( $columns, 0, 1, true…Continue reading
add_filter( ‘wpcode_snippets_per_page’, function() { return 25; });Continue reading
php_value memory_limit 256MContinue reading
// PHP function to display product attributes add_action( ‘woocommerce_after_shop_loop_item_title’, ‘display_product_attributes_on_hover’, 10 ); function display_product_attributes_on_hover() { global $product; // Get product attributes $attributes = $product->get_attributes(); if ( ! empty( $attributes ) ) { // Output container for product attributes, initially hidden…Continue reading