Archives: Snippets
Code for importing theme files from plugin
/** * 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 Theme Supports
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
WPCode Functions
/** * WPCode Admin UI Enhancements * – Skip library screen * – Set snippets per page * – Show active snippets first * – Adjust column widths and header wrapping * – Format Created column */ // 1. Skip…Continue reading
WPCode Admin Number of Snippets (copy)
add_filter( ‘wpcode_snippets_per_page’, function() { return 25; });Continue reading
specific-element-custom-font.css
div#om-{{id}} .my-headline * { font-family: “Proxima Nova”, Helvetica, “Helvetica Neue”, Arial, sans-serif !important; }Continue reading
Editing the .htaccess File
php_value memory_limit 256MContinue reading
product attributes on hover
// 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
How to Check If Your Debug Certificate Has Expired
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkeyContinue reading