Tag: customize

Total 2 Posts

WooCommerce, aggiungere una descrizione breve o lunga ai prodotti nella pagina del negozio

E’ spiegato qui. Bisogna editare il file functions.php del proprio tema.

Descrizione lunga
add_action( 'woocommerce_after_shop_loop_item_title', 'wc_add_long_description' );
/**
 * WooCommerce, Add Long Description to Products on Shop Page
 *
 * @link https://wpbeaches.com/woocommerce-add-short-or-long-description-to-products-on-shop-page
 */
function wc_add_long_description() {
	global $product;

	?>
        <div itemprop="description">
            <?php echo apply_filters( 'the_content', $product->get_description() ) ?>
        </div>
	<?php
}
Descrizione corta
add_action( 'woocommerce_after_shop_loop_item_title', 'wc_add_short_description' );
/**
 * WooCommerce, Add Short Description to Products on Shop Page
 *
 * @link https://wpbeaches.com/woocommerce-add-short-or-long-description-to-products-on-shop-page
 */
function wc_add_short_description() {
	global $product;

	?>
        <div itemprop="description">
            <?php echo apply_filters( 'woocommerce_short_description', $product->get_short_description() ) ?>
        </div>
	<?php
}

Se invece volessimo limitare la descrizione completa a n caratteri (nell’esempio 200 caratteri):

add_action( 'woocommerce_after_shop_loop_item_title', 'wc_add_long_description' ); /**  * WooCommerce, Add Long Description to Products on Shop Page with Character limit  *  * @link https://wpbeaches.com/woocommerce-add-short-or-long-description-to-products-on-shop-page  */ function wc_add_long_description() { global $product; ?>         <div itemprop="description">             <?php echo substr( apply_filters( 'the_content', $product->get_description() ), 0,200 ); echo '...' ?>         </div> <?php } 

Thunderbird: cambiare dimensione font

Una cliente mi ha detto di non apprezzare Thunderbird perché il carattare dell’elenco dei messaggi è troppo piccolo. Ho aumentato la dimensione dei caratteri Window ma, effettivamente, il risultato non è dei migliori.

Qui (thx to Lance Jian) ho trovato la soluzione (per Mac OSX).

La ricopio pari pari di seugito:

Change the Font Size

This works on Thunderbird 78.4.0.

First, go to “Help” > “Troubleshooting Information”, click the button “Show in Finder” next to “Profile Folder”. It will open the profiles folder.

Find the folder named xxxxxx.default-release, create a new folder chrome along side with the Mail folder.

Inside the chrome folder, create a file userChrome.css with following content:

/*
* Do not remove the @namespace line -- it's required for correct functioning
*/
@namespace url("https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* Set font size in folder pane */
#folderTree >treechildren::-moz-tree-cell-text {
    font-size: 1.2rem !important; /* You can also use em, pt or other units here.*/
}

/* Set font size in thread pane */
#threadTree >treechildren::-moz-tree-cell-text {
    font-size: 1.2rem !important;
}

/* Set height for cells in folder pane */
#folderTree >treechildren::-moz-tree-row {
   height: 22px !important;
}
/* Set height for cells in thread pane */
#threadTree >treechildren::-moz-tree-row {
   height: 22px !important;
}

Next, you need to open “Preferences” > “General” > “Config Editor…”, accept the warning dialog.

Search for toolkit.legacyUserProfileCustomizations.stylesheets and double click it to set its value to true.

Finally, restart your Thunderbird.