Html Template for Mail

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #42113

    Hi Olly

    Wie kann ich Menge breite verkleinern?
    Wie kann ich grösse der Zutatentext ändern. im Bild als Gelb markiert.

    Template screen

    I have under the wppizza> Template> html format> Style input html code changed but still could not improve both points.
    Thanks for any help

    Admin & Mod

    you can only do this using filters
    assuming that you know how filters work, this is the one that’s added for this ($styles being an array of different elements )

    $styles = apply_filters('wppizza_ingredients_filter_email_styles', $styles );

    Admin & Mod

    PS: the default $styles array is this

    $styles = array();
    $styles['ingrinfo'] 	= 'white-space: initial; margin: 3px; line-height: 130%;' ;
    $styles['ingr_item'] 	= 'font-style: italic;' ;
    $styles['ingrinfo'] 	= 'white-space: initial; margin: 3px 3px 3px 20px; line-height: 130%; font-size:85%;' ;
    $styles['ingrgrp'] 	= 'white-space: initial; margin: 3px;line-height: 130%;' ;
    $styles['ingrgrp_0'] 	= 'white-space: initial; margin: 3px;line-height: 130%; display:inline' ;
    $styles['ingrgrp_1'] 	= 'white-space: initial; margin: 3px;line-height: 130%; margin-left: 15px' ;
    $styles['ingrgrp_lbl'] 	= 'font-weight: bold; padding-right: 3px;' ;
    $styles['comments'] 	= 'padding: 3px 0; font-size: 75%;' ;

    1- where should I insert this code?
    2- Will it be deleted after an update?


    Admin & Mod

    you MUST learn how wordpress action and filter hooks work if you want to do ANY kind of wordpress alteration that are beyond just simple point and click
    here’s a quick overview

    2) it depends on where you put your code (i strongly suggest you use child themes as they do not get updated when you update your theme)

    the reason why it’s not in the template section is because it’s coming from the add ingredients plugin and the options that plugin provides to add things to orders would make it completely unmanageble if added to the inputs of th etemplates

    your filter will the look *something like* this (depending what exactly you want to achieve, but as a starting point)

    add_filter('wppizza_ingredients_filter_email_styles', 'myprefix_filter');
    function myprefix_filter($styles){
    		the 120% here overrides any previous (default of 85%) 
    		font-size declaration for the element   
    	$styles[ingrinfo] .= 'font-size:120%;';
    return $styles;

    Dear Olly
    Thank you for your valuable help. I did it.
    Only now I want to take all selected ingredients in brackets.
    For example: (1 x olives, 1x broccoli, 1 x capers)

    Which code can I use for brackets?

    Thanks again for all the help.
    best regards


    [Edit:redacted by admin to not confuse people (errors in code) ]


    hello olly

    I think I solved the problem.

    Thank you
    best regards

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Html Template for Mail’ is closed to new replies.