Forum Replies Created

Viewing 30 posts - 301 through 330 (of 691 total)
  • Author
    Posts
  • hm, no … that is the only snippet I got from them that I should add in the menu area for a language switcher, that connects the German and the English version of a post/page:

    https://github.com/inpsyde/MultilingualPress/wiki/Public-Functions

    Hi,

    yes, I have a snippet, but due to I am not a coder, I don’t know how to add this to a header-widget-area within the submenu (not main menu!):

    <?php
    	if( function_exists( 'mlp_show_linked_elements' ) ) :
    	mlp_show_linked_elements( 
    	array(
    	'link_text' => 'flag', // oder 'text' oder 'text_flag'
    	'show_current_blog' => TRUE   // TRUE - display the current language, FALSE - hide the current language (default)
    	) 
    	);
    	endif;
    ?>

    I got it:

    #menu-item-3799 > a::before {
        content: "\e824";
        font-family: entypo-fontello;
        font-size: 20px;
        padding-right: 6px;
        vertical-align: text-top;
    }

    Topic can be closed, thank you.

    okay, then back to my first post’s question, you still haven’t answered it:

    Can you please tell me how to add such a “header widget area” to the sub-menu stripe (https://imgur.com/NHe15J6) ?

    It is working in some way, because he had success in adding the switcher box:
    https://kriesi.at/support/topic/multilingualpress-language-switcher-in-secondary-header/

    thanks, and what about a header widget area, doesn’t this work?

    And why the header.php, there is not much in this file – for adding the flags to the submenu resp. next to the social icons: wouldn’t it be better to use helper-main-menu.php?

    in reply to: MultilingualPress & ENFOLD – compatible? Experiences? #929871

    Yes, I already searched the old forum posts – but I hoped, that there are some new informations on MultilingualPress.
    Perhaps someone else?

    in reply to: Enfold Showcase #924899

    @alexandernoe there is something wrong with your https://shop.brautbluete.de/ site, there is only the navigation:

    Firefox Quantum 58.0.2 on Windows 10 prof.

    in reply to: Adding additional text to ENFOLD's breadcrumbs? #917869

    Works fine, thank you very much.

    in reply to: 404 Page with ALB – is this possible? #917367

    okay, thanks, I see … it’s a but complicated for me, to edit the PHP file directly.
    But I found a plugin, that is well tested with ENFOLD theme:

    So I created my own Error-Page with the Advanced Layout Builder and assigned it to the settings of the plugin … works fine.

    in reply to: Adding additional text to ENFOLD's breadcrumbs? #917055

    Thanks, but where do I need to add your new line

    $trail[2] = 'Thema: ' . $trail[2];

    in this snippet

    add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
    function avia_breadcrumbs_trail_mod( $trail, $args ) {
    	if ( is_category() ) {
    		$trail['trail_end'] = 'Thema: ' . $trail['trail_end'];
    	}
    	elseif ( is_tag() ) {
    		$trail['trail_end'] = 'Schlagwort: ' . $trail['trail_end'];
    	}
    	else {
    		$trail['trail_end'] = $trail['trail_end'];
    	}
    	return $trail;
    }

    do you mean to replace every time the word “end” with “2”?
    Sorry for the stupid question, but I don’t know PHP very well :-(

    And how can I combine all this with the snippet from you, that I need so that it does not show “Blog” twice?
    “Blog” is shown twice on category and tag archive, in single post view it is okay.

    thank you

    in reply to: How to give each category name in minor meta its own color? #916934

    — SOLVED —

    The code in loop-index.php must be rewritten in some part:

    Replace

                   if(!empty($taxonomies))
                    {
                       foreach($taxonomies as $taxonomy)
                        {
                            if(!in_array($taxonomy, $excluded_taxonomies))
                            {
                                $cats .= get_the_term_list($the_id, $taxonomy, '', ' ','').' ';
                           }
                        }
                    } 

    with this

    if(!empty($taxonomies))
    				{
    					foreach($taxonomies as $taxonomy)
    					{
    						if(!in_array($taxonomy, $excluded_taxonomies))
    						{
    							// get all the terms in this taxonomy
    							$terms = get_the_terms(null, $taxonomy)? : [];
    
    							foreach ($terms as $term) {
    								// loop through them, and add the color as style attribute
    								$cats .= sprintf(
    									'<a href="%s" style="color: %s">%s</a>', 
    									get_term_link($term),
    									get_field('color', $term),
    									$term->name
    								);
    							}
    						}
    					}
    				}

    At the ACF forum told me someone right now:

    the function get_queried_object is getting the current object. So, on a archive page, the current object is the current taxonomy term. However, on the single, it is the current post. That’s why acf couldn’t return the value unless you tell it to get it from the taxonomy.
    In the part, where the theme is using get_the_term_list to build the category list, however, if you want to apply custom class to it, you’d need to construct the html output yourself.

    Result:
    the category color is grabbed from the color field in the AdvancedCustomFields plugin, which makes an extra colorpicker in the category editing panel:

    Output Single Post:

    Replace exactly the same lines with the same code snippet in the postslider.php, so that the category have its own color, too, when you are using the ALB blog posts element.

    All is fine, you can close the ticket now.

    in reply to: Adding additional text to ENFOLD's breadcrumbs? #916446

    Hi Ismael,

    sorry for the delay and thanks for your code snippet, but it does not work:
    it shows not the word “Thema” (= Category in English) in front of the category name,
    and not “Schlagwort” (= Tag in English) in front of a tag name.

    do you have any modifications of your code?

    in reply to: How to give each category name in minor meta its own color? #916340

    ———————- UPDATE ————————–

    I partly managed it using the AdvancedCustomFields Plugin.

    I created fields for the category image and the category color:

    and added in archive.php according to the documentation here:

    • Right after get_header();:
      			//	get the current taxonomy term
      				$term = get_queried_object();
      			//	vars - ACF for showing Images and Color in Category Backend
      				$image = get_field('image', $term);
      				$color = get_field('color', $term);
    • and before the term-description this:
      	<style type="text/css">
      		.entry-content-wrapper .post-title {
      			color: <?php echo $color; ?>;
      		}
      		.blog-categories.minor-meta a {
      				color: <?php echo $color; ?>;
      				}
      		<?php if( $image ): ?>
      			.categoryheaderimage {
      				background-image: url(<?php echo $image['url']; ?>);
      			}
      		<?php endif; ?>
      	</style>
      	<div class="categoryheaderimage"> </div>

    It works fine, it shows my category image and the post title in its category color as well as the category name in the minor-meta.
    Here when editing a category:

    and the output:

    ————————-> Now my question:
    I can’t get exactly these snippets to work in the loop-index.php as I had in the archive.php described above, so that the category name in the minor-meta is shown in its category color:

    I simply don’t know, where in the loop-index.php I can add this for grabbing the ACF fields:

    (1)

    //	get the current taxonomy term
    $term = get_queried_object();
    //	vars - ACF field for showing Category Color in Category Backend
    $color = get_field('color', $term);

    and where to add this HTML:

    (2)

    <style type="text/css">
    .entry-content-wrapper .post-title {
    color: <?php echo $color; ?>;
    }
    .blog-categories.minor-meta a {
    color: <?php echo $color; ?>;
    }
    </style>

    Maybe

    get the current taxonomy term
    				$term = get_queried_object();

    is not right like in archive.php, because the loop-index.php is not a category page?!?
    … if you could please just let me know, where in the loop-index.php I can add correctly these PHP syntax.
    Thanks a lot.

    • This reply was modified 6 years, 10 months ago by BeeCee. Reason: added login data
    in reply to: AdvancedCustomFields and ENFOLD's archive.php #916334

    Update:

    I figured it out, it was just a mistake in the CSS for the category image – it needed a height value.

    — SOLVED —

    Great, I changed it to 40% and it works fine now and responsive with equal line lengths, thank you, you can close the ticket.

    in reply to: How to achieve the fading-in-effect of "av-special-heading"? #915693

    Great, I understand and reproduced this effect successfully, thank you!

    in reply to: How to achieve the fading-in-effect of "av-special-heading"? #915119

    No :-)
    this is not my site, but I would like to achieve the same effect as the site owner used here with ENFOLD’s av-special-heading

    in reply to: How to add Flipboard to social icons? #914868

    Hi Nikko,

    no, no widget area. But I searched in the forum and have now another solution, that works fine if someone needs this, too:

    ENFOLD – Adding custom social icon to theme settings

    • Since there is no Flipboard icon at Fontello, download the “vector pack” at Flipboard directly:
      “Want to design your own button?” »
    • Search the file “Logomark_DIGITAL_Red_500X500.svg” in the downloaded files and upload it in the “custom icon” area at Fontello.
    • Set the font size to 16px and above where you have uploaded it, set a name for it, for example “flipboardicon” and download this new webfont.
    • Then go to ENFOLD’s theme settings -> import/export and upload the ZIP file into the fontmanager area.
    • Then follow the instructions at the very beginning of the documentation here: https://kriesi.at/documentation/enfold/custom-social-icons/.
      In detail: I have added the snippet in a “code-snippets-plugin“; this plugin stores all snippets, that would normally go to your theme’s function.php. But with this plugin you can import/export them, enable or disable snippets just how you like.
      So I added there (or add it to your child theme’s function.php):

      // Register new icon as a theme icon
      function avia_add_custom_icon($icons) {
      	$icons['flipboard']	 = array( 'font' =>'flipboardicon', 'icon' => 'ue800');
      	return $icons;
      }
      add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
      
      // Add new icon as an option for social icons
      function avia_add_custom_social_icon($icons) {
      	$icons['flipboard'] = 'flipboard';
      	return $icons;
      }
      add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

      “flipboardicon” is the fontname like I have called it at Fontello and uploaded it in the theme settings.

    • Then go to ENFOLD’s theme settings –> social profiles, and add there a new item; find the symbol “Flipboard” at the very bottom of the list. As target use your Flipboard profile URL, where the user can find your own magazines, for example those, that you have created to import there your blog posts for a higher traffic :-)

    • For the hover background in the menu, I added these CSS
      #top .av-social-link-flipboard:hover a {
      	background-color: #f52828 !important; 
      }

    That’s it :-)

    Result:

    Normal state:

    Hover state:

    in reply to: How to add Flipboard to social icons? #914845

    Hi Nikko,

    yes I read this, but it is neither Fontello, nor image nor font, the code is with an “action” and “javascript”:

    <a data-flip-widget="ico" href="?utm_campaign=tools&utm_medium=follow&action=follow"><img src="https://cdn.flipboard.com/badges/flipboard_sbsw.png" alt="Flipboard" /></a><script src="https://cdn.flipboard.com/web/buttons/js/flbuttons.min.js" type="text/javascript"></script>

    according to
    // https://about.flipboard.com/social-plugins/?tool=follow

    I thought of something like this:
    https://kriesi.at/support/topic/add-new-or-custom-social-icon/

    in reply to: How to get a RSS feed for portfolio items? #914799

    Ah, I see, thank you, works fine!

    in reply to: YOAST SEO Content Analysis for Avia Layout Builder #914017

    @rsm-dd no update?

    @all any alternatives?

    in reply to: Enfold und Bilder #912530

    I have the same problem @netgo2017:

    The full width slideshow seems not to offer “screen options” @Ismael

    and there are only those image size options:

    normally the elements templates act with drag&drop like the ALB elements itself.

    I can drag/drop the ALB items as always to that place at a page, where I need them.
    But for some reason since one of the last ENFOLD updates the “entry templates” react only by click and not by drag&drop (see my video above), BUT: the ALB items itself are still okay (drag&drop as well as clicking them works).

    I disabled all plugins, created a fresh WP sub-site in my multisite with a fresh ENFOLD in it: still the same.

    Hi Mike,

    thanks, the clicking is working – but then the “element template” goes to the very end of the page … and when you have a very long page you have to move this element again to the very top, where I need it.

    Why doesn’t this work anymore with drag&drop?

    in reply to: How to add "edit" link for pages/posts in the functions.php? #911975

    Works perfectly, thank you very much, Nikko:

    in reply to: How to add latest FontAwesome to ENFOLD? #911204

    Thank you. As I’m no coder, so please could tell me the right way to use it? I found in this forum two different ways of adding it, some from very old posts here. So what way is besser and not so … “outdated”?

    (1)

    function avia_add_fontawesome(){
    ?>
    <script src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
    <?php
    }
    add_action('wp_head', 'avia_add_fontawesome');

    or (2)

    add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
    function enqueue_font_awesome() {
    	wp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.0.6/js/all.js' );
    }
    in reply to: How to add "edit" link for pages/posts in the functions.php? #911190

    That’s it, thanks, Nikko, just one thing:

    it works fine at posts:

    But on PAGES (that I create mostly with ALB), it appears twice:

    (Info: My PAGES are – not all, but mostly – created with ALB,
    and all my posts are NOT created with ALB, if this is helpful to know)

    How can I modify the code snippet, so that “edit this page” only appears once on ALB PAGES?
    Thank you.

    in reply to: How to add "edit" link for pages/posts in the functions.php? #910585

    yes, that is the method, I have done: adding the snippet to these files.

    But someone here in the forum gave a user a snippet for the adding it to the functions.php, so that automatically an edit link is added to each post, page and other custom post types.
    Unfortunately I cannot find this anymore here …

    in reply to: Append link on copied text #910056

    I use this snippet from http://www.wpbeginner.com/wp-tutorials/how-to-add-a-read-more-link-to-copied-text-in-wordpress/ and added the snippet to this plugin https://de.wordpress.org/plugins/code-snippets/.

    Every snippet, that needs to go into the functions.php of ENFOLD, goes instead now into this Code-Snippets plugin – quick and easy.

    there is no file named “recent comments widget”?!?!?

Viewing 30 posts - 301 through 330 (of 691 total)