Forum Replies Created

Viewing 30 posts - 1,591 through 1,620 (of 10,895 total)
  • Author
    Posts
  • haha – sorry for the font colors in a text-block ( tiny-mce ) this is not a full solution – i will have a look to add there an additional row …

    not as easy as one two three – but if you like :
    this comes to child-theme functions.php:

    // Custom theme colors ( max 8 - notation without #  but a name seems to be mandatory )
    $avia_custom_colors = array(
    	'14bed2' => __( 'Primary blue', 'avia' ),
    	'cadd69' => __( 'Primary green', 'avia' ),
    	'70736f' => __( 'Primary gray', 'avia' ),
    	'f26722' => __( 'Secondary orange', 'avia' ),
    	'fdbb4a' => __( 'Secondary yellow', 'avia' ),
    );
    
    /**
     * Customize TinyMCE text color picker.
     * Filter: tiny_mce_before_init
     *
     * @param  array $init Initialiation array for TinyMCE
     * @return array
     */
    function avia_set_colors_tinymce( $init ) {
    	global $avia_custom_colors;
    
    	/**
    	 * Array to hold custom colors.
    	 * Note that this not an associative array.
    	 * Each color takes up two array elements.
    	 */
    	$colors_custom = array();
    	foreach ( $avia_custom_colors as $color => $label ) {
    		$colors_custom[] = $color;
    		$colors_custom[] = $label;
    	}
    
    	/**
    	 * I like the custom colors to take up the entire
    	 * first row. However, if there are only a few colors,
    	 * the color picker becomes too narrow and tall,
    	 * so this adds blank squares to help stretch it out.
    	 * This block can be removed if you don't want placeholders
    	 */
    	$_num_of_cols = 8;
    	while ( count( $colors_custom ) / 2 < $_num_of_cols ) {
    		$colors_custom[] = '_hide';
    		$colors_custom[] = '';
    	}
    	
    	/**
    	 * Original colors.
    	 * @see wp-includes/js/timemce/langs/wp-langs-en.js
    	 */
    	$colors_original = array( '000000', 'Black', '993300', 'Burnt orange', '333300', 'Dark olive', '003300', 'Dark green', '003366', 'Dark azure', '000080', 'Navy Blue', '333399', 'Indigo', '333333', 'Very dark gray', '800000', 'Maroon', 'FF6600', 'Orange', '808000', 'Olive', '008000', 'Green', '008080', 'Teal', '0000FF', 'Blue', '666699', 'Grayish blue', '808080', 'Gray', 'FF0000', 'Red', 'FF9900', 'Amber', '99CC00', 'Yellow green', '339966', 'Sea green', '33CCCC', 'Turquoise', '3366FF', 'Royal blue', '800080', 'Purple', '999999', 'Medium gray', 'FF00FF', 'Magenta', 'FFCC00', 'Gold', 'FFFF00', 'Yellow', '00FF00', 'Lime', '00FFFF', 'Aqua', '00CCFF', 'Sky blue', '993366', 'Brown', 'C0C0C0', 'Silver', 'FF99CC', 'Pink', 'FFCC99', 'Peach', 'FFFF99', 'Light yellow', 'CCFFCC', 'Pale green', 'CCFFFF', 'Pale cyan', '99CCFF', 'Light sky blue', 'CC99FF', 'Plum', 'FFFFFF', 'White', );
    	
    	// Create complete colors array with custom and original colors
    	$colors = array_merge( $colors_custom, $colors_original );
    
    	/**
    	 * Begin textcolor parameters for TinyMCE plugin.
    	 * @link https://www.tinymce.com/docs/plugins/textcolor/
    	 */
    	$init['textcolor_map'] 	= json_encode( $colors );
    
    	/**
    	 * Colors are displayed in a grid of columns and rows.
    	 * Set the number of columns to match the number of custom colors,
    	 * this way our colors make up the first row so they're easier to identify quickly.
    	 * Halve the count since each color has two array entries.
    	 */
    	$init['textcolor_cols'] = count( $colors_custom ) / 2;
    	
    	// Set number of rows
    	$init['textcolor_rows'] = ceil( ( ( count( $colors ) / 2 ) + 1 ) / $init['textcolor_cols'] );
    	
    	return $init;
    }
    add_filter( 'tiny_mce_before_init', 'avia_set_colors_tinymce' );
    
    /**
     * Adjust TinyMCE custom color styling grid
     * Action: admin_head
     */
    function avia_style_custom_colors_timymce () { ?>
    	<style type="text/css">
    		/* Add padding after first row */
    		.mce-colorbutton-grid tr:first-of-type td {
    			padding-bottom: 10px;
    		}
    
    		/* Hide the filler blocks */
    		.mce-colorbutton-grid tr:first-of-type td div[data-mce-color="#_hide"] {
    			visibility: hidden;
    		}
    
    		/* Fix spacing issue with the "transparent" block */
    		.mce-colorbtn-trans div {
    		    line-height: 11px !important;
    		}
    	</style>
    <?php }
    add_action( 'admin_head', 'avia_style_custom_colors_timymce' );
    
    /**
     * Customize Iris color picker.
     * Inspired by @link https://wordpress.org/plugins/iris-color-picker-enhancer/
     * Action: admin_footer, customize_controls_print_footer_scripts
     */
    function avia_set_colors_iris() {
    	global $avia_custom_colors;
    	
    	if ( wp_script_is( 'wp-color-picker', 'enqueued' ) ) : ?>
    		<script type="text/javascript">
    			jQuery.wp.wpColorPicker.prototype.options = {
    				palettes: [
    					<?php foreach ( array_keys( $avia_custom_colors ) as $color ) {
    						echo "'#$color',";
    					} ?>
    				]
    			};
    		</script>
    	<?php endif;
    }
    add_action( 'admin_footer', 'avia_set_colors_iris' );
    add_action( 'customize_controls_print_footer_scripts', 'avia_set_colors_iris' );

    Well – then you had to wait for a mod to solve the problem – but occasionally other participants are good experts in special fields. e.g. what concerns the MagnificPopup Script. ;)

    Sorry for the Intermission: Unfortunately, your other topic is already closed. Link
    Of course Enfold has a solution for this – under : Layout Builder – Custom Color Palette

    in reply to: The font clitch #1403025

    on Performance Tab of Enfold Options – please check the “Show Advanced Options”
    what do you have set for “Custom Font Display Behaviour” ?

    that link on the info: https://developer.chrome.com/blog/font-display/ might be usefull.

    is there a page we can see the issue?

    The Problem with pdf is to force a download only in all browsers instead of opening it!

    Adding to an anchor the attr : download will do for the most browsers the job – but …
    so you can fill a textwidget by adding media files ( even pdf ) and then a snippet will do the rest that a download is forced.
    But Firefox for example – downloads that pdf but also open it.

    can you please answer the questions above.

    Are these files mixed types ( images, pdf, docs etc .) or only by one media-type?
    You are looking for a widget solution?

    Not for this – I didn’t know you could set gradients on sharp transitions for a long time.
    you are welcome! I am always happy to help

    in reply to: sort the displayed articles by popularity #1402877

    What expresses “popularity”? Comments or post views?
    Do you measure your page views?

    in reply to: “powered by Enfold WordPress Theme” #1402873

    You can find several posts using the search function on how to remove this notice in the footer.
    add to your own notice there : [nolink]

    You can even find it in the documentation ( link ) . If you have a little patience, you will be answered even here friendly and in compliance with netiquette. Even people who have no profit from the theme here – nice and friendly participants like me answer you comprehensively and quickly.
    You can even rewrite this note that is automatically inserted there to your own settings.
    Here is an answer from my side that is not too long ago. : Link
    I wish you another beautiful day. ;)

    in reply to: customize buttons as h1, h2, h3… #1402858

    just to mention it for button-row element :
    to select specifically – it would be nice if these buttons of a button row have a specific selector; and not to handle with nth-child or nth-of-type etc.
    to get this done – here is another child-theme functions.php snippet:

    function id_to_button_row_buttons(){
    ?>
    <script>
    (function($) {
    	$('.avia-buttonrow-wrap').each(function(a){
    		var ButtonRowID = ($(this).attr('id') !== undefined) ? $(this).attr('id') : 'button_row'+(a+1);
    		var that = this;
    		$('.avia-button', this).each(function(i){
    			$(this).attr('id', ButtonRowID+'-button'+(i+1));
    		});
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action( 'wp_footer', 'id_to_button_row_buttons');

    see in action: https://webers-testseite.de/buttonrow/
    the anchors ( avia-button) will have then each a unique ID

    in reply to: customize buttons as h1, h2, h3… #1402839

    The will is man’s heavenly kingdom.

    you can do that by child-theme functions.php snippet:

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          replaceElementTag('.avia-button-wrap .avia-button.avia-size-x-large .avia_iconbox_title', '<h4></h4>');  
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');

    you see how it works: all extra large buttons text will be surrounded by h4 tags then.
    to show these h-tags besides the icons – as before you had to set:

    #top .avia-button .avia_iconbox_title {
      display: inline-block;
    }

    and btw: anchors are inline elements – you can wrap other inline elements ( without other anchor tags ) – so if you set the h-tag to show inline-block this is even html valide ;)

    if you only want to replace specific button text : give a custom class to that button – this class will be on the wrapper – so :

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          // f.e.: custom-class expresses the h-tag you like to get
          replaceElementTag('.avia-button-wrap.is-h1 .avia-button .avia_iconbox_title', '<h1></h1>');  
          replaceElementTag('.avia-button-wrap.is-h2 .avia-button .avia_iconbox_title', '<h2></h2>');  
          replaceElementTag('.avia-button-wrap.is-h3 .avia-button .avia_iconbox_title', '<h3></h3>');  
          replaceElementTag('.avia-button-wrap.is-h4 .avia-button .avia_iconbox_title', '<h4></h4>');  
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');

    Or is it the other way round: that a headline tag looks like a button?

    in reply to: Icon Box Giving Me Funky Shapes #1402835

    you have set the articles (.iconbox) to display: flex to center icon and text horizontally .
    But you missed to set a min-width for the icon

    try in quick css:

    .flex_column article .iconbox_icon {
      min-width: 74px !important
    }


    But
    : maybe it is best to not display : flex – because have a look to smaller screens before it breaks to responsive case.

    in reply to: Cannot show copyright at the footer #1402830

    or redefine the backlink by this in your child-theme functions.php:

    /**  new backlink in copyright insertion*/
    function new_nolink(){
    $kriesi_at_backlink = " - <a href='https://your-link'>your link text</a>";
    return $kriesi_at_backlink;
    }
    add_filter("kriesi_backlink","new_nolink");

    Of course, you then had to remove the [nolink] from the copyright input field.

    _____________

    different way to write:

    function my_own_backlink($link){
      $no = "rel='nofollow'";
      $target = "_blank";
      $backlink_url = 'Backlink URL';
      $theme_string = 'Custom Backlink Text'; 
      $link = " - <a {$no} href='{$backlink_url}' target='{$target}'>{$theme_string}</a>";
      return $link;
    }
    add_filter( 'kriesi_backlink', 'my_own_backlink', 10, 1);

    and why not using the icon list in minimal small list view ?
    you can insert different icons , you can set the link to icon and text or only to the icon or text etc. pp.

    why don’t you solve it by just css – and make that “separator” part of the footer itself?
    and if this separator is a big one ( f.e. height 50px ) – just add more padding on top:

    #footer {
      background-size: 100% 50px;
      background-position: 0px 0px;
      background-repeat: no-repeat;
      background-image: linear-gradient(180deg, green 0%, green 25%, blue 25%, blue 50%, purple 50%, purple 75%, orange 75%, orange 100%);
      padding: 65px 0 30px 0;
    }

    Big advantage of that way: if you have a curtain effect on footer – this will be o.k. because no extra calculation is needed – these lines are part of the footer height.

    ____________________
    PS:
    But if you like to make it your way:
    Enfold got a hook for that: ava_before_footer

    add_action('ava_before_footer', function() {
    echo '<div id="de-footer-bar">
            <div class="de-colour green"></div>
            <div class="de-colour blue"></div>
            <div class="de-colour purple"></div>
            <div class="de-colour orange"></div>
        </div>';
    });
    in reply to: Htag Issue #1402600

    yes, that was also the one thing I saw. The empty p-tags. Of course, there must be a reason for this.

    in reply to: Htag Issue #1402530

    can you please make a screenshot – where the extra H3 tag is – or tell us the content of that heading to find that place.

    Sorry – no private messages for me – you had to wait till mods are here.

    if it is your homepage – i see there are different renderings – maybe it is because you host only the 400 – regular font-weight !
    The headings are set to 300 – light font-weight.
    i do not know how they react if they do not find the font-weight used – but i guess that safari will take the fallback font-family then.

    maybe you think of to offer only the variable font for your page – then you will have all font-weights you need.
    ______

    Im übrigen solltest Du eventuell für diese sehr schmalen Screenweiten, die Grid-Cell Paddings von den 100px verkleinern.

    • This reply was modified 1 year, 8 months ago by Guenni007.

    i’m kidding – but what do you mean by “not displayed correctly” – is it a different font-family, font-style, font-weight etc.

    in reply to: Team Page Layout Model. #1402251

    It is not a pre-designed layout!
    Enfold builds up the layouts like a construction kit (modular). You have elements that provide a certain larger structure and can serve as containers for other children containers. At the same time, these parent containers can be used to define backgrounds or separations between sections. ( color-section, Grid-Row, Tab-Sections ). The other layout elements serve to make divisions of this total width. 1/1 , 1/2 etc. pp.
    In the next tab of the Advanced Layout Builder you see content elements. Here you will also find your Team-Member element.
    You simply drag it to the place where you want to place it e.g. in a 1/2 container. etc..
    The third tab contains media elements, two of which are full-width elements – and thus cannot be dragged inside a container (full-width and full-screen sliders).
    Your team page now has some 1/1 containers – then for the first two team members two 1/2 containers and so on.

    after drag&drop all your elements to your layout – you can now begin to style and fill the elements with input.
    F.e. the team-member element – click on the Element itself in your layout – a popup with styling options shows you how you can insert and style it.
    Here again there are tabs that show a meaningful structure of what is being done.

    in reply to: Google maps fullscreen GDPR #1402194

    this is wat i see:

    so first: why did you nested your code inside containers that are no full containers? If you like to have it full-width?
    place a color-section – that is a full-width element – maybe give the wanted height of your map to that section – and place only inside a code-block element – with your shortcode inside. – hope that will help

    I do not see any hint for opt-in !!!

    in reply to: Google fonts und Datenschutz #1402187

    have you realy copy&pasted the snippet above ?

    because – where is the closing (ending) semicolon ?

    by the way – you can delete these comments or place the snippets under these comment.

    in reply to: Enable swipe feature to lightbox? #1402160

    have you checked if it is not activated on default?

    in reply to: Google fonts und Datenschutz #1402115

    BUT : after that – open functions.php on the right side of that window
    do not kill the first line <?php

    on english it is : Appearance – Theme File Editor.
    On default it is visible that option to edit theme files via dashboard – if not – tell us – mayby your security settings or a plugin hampers that option.

    in reply to: Google fonts und Datenschutz #1402013

    as i wrote : Child Theme functions.php

    in reply to: Google fonts und Datenschutz #1401935

    Sorry no private content area for me. I’m participant as you

    Schön – mach doch noch die letzte Color-Section auch in dem dunklen Blau – der Breite Abstand stört ein wenig. Dann kann man auch den Trenner sehen.

    Der weiße Border kommt dann vom:

    .container_wrap {
      border-top-style: solid;
      border-top-width: 1px;
    }

    den schmeiß ich auch immer direkt raus ( also auf border-top: none )

Viewing 30 posts - 1,591 through 1,620 (of 10,895 total)