Forum Replies Created

Viewing 30 posts - 2,371 through 2,400 (of 11,695 total)
  • Author
    Posts
  • sorry – no private content area for me – i’m participant as you are.

    in reply to: Add category to blog widget #1403747

    Great !

    in reply to: SVG logo won’t show in header. #1403737

    Then we have to know more details – is Enfold Up to Date. What about WordPress Version.
    Or just post a link to your page – if not possible on public – use the private content area for the mods.

    Please pull your svg logo to a browser window – to see if it is rendered by a browser.

    in reply to: SVG logo won’t show in header. #1403727

    this link : https://kriesi.at/documentation/enfold/example-of-logo-left-menu-center-widget-right seem to be long time ago when there was no support for svg inline logo.

    Try to get rid of css that concerns to logo and logo img .
    First just get rid of the logo size setting:

    .responsive #top #header .logo,
    .responsive #top #header .logo a,
    .responsive #top #header .logo img {
        /*! width: auto; */
        /*! height: auto; */    
        align-items: center;
        align-self: center;
        justify-content: center;
    }

    inline svg needs absolute dimension settings – the auto will end in svg dimension 0px

    Dear Vanessa – if you look at all my other postings (now over 9300) you will see that it is rather the other way around. I often tend to provide long answers with as accurate as possible mostly even illustrated postings. With such small quick css settings I didn’t think it was necessary to have a longer conversation.
    And abbreviations like btw and afaik and more should have made their way into the Internet culture by now.

    Unfortunately, I have had the experience that most participants do not read the long answers. Descriptions are not read, that one should set e.g. a user-defined class not heeded or case distinction overread.

    e.g.
    https://kriesi.at/support/topic/host-web-font-yourself-some-info/#post-1364066

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

    Also in the context that you expect a quick solution / answer, it makes sense for other problems to open a separate topic; especially since it may also be interesting for other participants who have similar problems.

    Now to your question: It makes sense for file uploads to use a plugin; because it is not only the function that you have to consider here, but also security aspects. I use when such functions are required for my customers then Contact Form 7 and Drag and Drop Multiple File Upload. Unfortunately, the latter is not a free plugin.

    in reply to: Add category to blog widget #1403529

    wow

    in reply to: Add category to blog widget #1403509

    yes – perfect – not as amateurish as my approach ;)
    I would not have come up with get_the_terms.

    Thanks alot!

    • This reply was modified 2 years, 6 months ago by Guenni007.
    #top .mfp-title {
      font-size: 24px;
      font-family: …
    }

    btw. for the counter:
    #top .mfp-counter

    in reply to: Add category to blog widget #1403488

    @Mike – please generate a Portfolio-Widget – what do you see there ?

    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 2 years, 6 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?

Viewing 30 posts - 2,371 through 2,400 (of 11,695 total)