Forum Replies Created

Viewing 30 posts - 1,891 through 1,920 (of 11,205 total)
  • Author
    Posts
  • in reply to: Add category to blog widget #1403434

    btw: to set a different source image for the newsbox / portfoliobox you can add that snippet to child-theme functions.php:
    ( you have to look what index your widgets get )

    function my_avf_newsbox_image_size( $image_size, array $args, array $instance ){
      if( $args['widget_id'] == ( 'portfoliobox-3' || 'newsbox-2' || 'newsbox-4' ) ){
        $image_size = 'square';
      }
      return $image_size;
    }
    add_filter( 'avf_newsbox_image_size', 'my_avf_newsbox_image_size', 10, 3 );

    now for the example above you can now enlarge the thumbnail via quick css:

    .news-thumb,
    .news-thumb img {
      width: 100px;
      height: 100px;
    }

    see: https://enfold.webers-webdesign.de/impressum/ at the footer widgets

    in reply to: Add category to blog widget #1403424

    There is probably a way to do it via child theme, – but because of the dependency of Portfoliobox to Newsbox it is a bit too complicated to give it out quickly. I’ll stay tuned!

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

    everything is right – little hint – place a video alb element outside of that with the link to your youtube video. On Content – you can click “Download Video Thumbnail” – this image will be saved in the media library.
    After that – you can get rid of that “helper” video alb element – but now you can insert this thumbnail inside the toggle content.

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

    but isn’t there already a count implemented in the combo widget?
    So there must be a possibility to use that. Or is that a popularity used comment-count ?

    in reply to: Duplicate Enfold sites #1403245

    Use Duplicator Plugin. Even the free Version is powerful enough to migrate that webseite. After installation you can Revalidate or remove the token, and insert a different one.

    in reply to: Make button h1/h2 etc #1403219

    just read

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

    so the top one is – if you like to change all x-large buttons to h4 tags.
    but if you like to decide from time to time – give those example classes to your button : is-h1, is-h2, is-h3 etc.
    then the snippet at the end will do the job.

    in reply to: Sitespeed Slow (TTFB +10 seconds) #1403171

    Maybe off topic – but you mentioned above the RestApi
    which in my opinion is a security risk anyway.
    With it you can e.g. read all usernames. Which is half of a bruteforce attack.
    Insert to your Browser :

    https://your-domain-url/wp-json/wp/v2/users

    and replace “your-domain-url” for your domain

    so many people disable this RestApi completely – or like me only for logged out users and only the security relevant things
    this goes into the child theme functions.php

    /**
     * REST-API Filter entfernt wichtige Informationen fuer den Zugriff von Aussen
     * @link https://developer.wordpress.org/rest-api/reference/ REST-API Referenz
     */
    add_filter('rest_endpoints', function ($endpoints) {  
    	if ( ! is_user_logged_in() ) {
    		$endpoints_to_remove = array(
    		'users',	/* removes the users from the data */
    		'settings',	/* removes the website settings from the data */
    		'posts',	/* removes the post content from the data */
    		'pages',	/* removes the page content from the data */  
    		);
    		foreach ($endpoints_to_remove as $endpoint) {
    			$base_endpoint = "/wp/v2/{$endpoint}";
    			foreach ($endpoints as $maybe_endpoint => $object) {
    				if (strpos($maybe_endpoint, $base_endpoint) !== false) {
    					unset($endpoints[$maybe_endpoint]);
    				}
    			}
    		}
    		return $endpoints;
    	}    
    });
    in reply to: Change “Tag Archive for” in title #1403146

    This comes to child-theme functions.php:

    function custom_tag_label_names( $label_name ){
      $label_name = __( 'XYZ:' ) . ' <span>' . single_tag_title( '', false ) . '</span>';
      return $label_name;
    }
    add_filter( 'avf_tag_label_names', 'custom_tag_label_names' );
    in reply to: Header : add a menu on the top left? #1403139

    Header – Extra Elements – Header Secondary Menu

    I’m not sure if the colored settings will preserve there – but you can style them manually via quick css

    in reply to: Make button h1/h2 etc #1403052

    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.

Viewing 30 posts - 1,891 through 1,920 (of 11,205 total)