Forum Replies Created
-
AuthorPosts
-
March 24, 2018 at 9:12 pm in reply to: MultilingualPress language switcher in ENFOLD header widget area #932482
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
March 23, 2018 at 11:38 am in reply to: MultilingualPress language switcher in ENFOLD header widget area #931927Hi,
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; ?>
March 23, 2018 at 1:55 am in reply to: How to use entypo-fontello icon as a menu item or before menu item text? #931725I 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.
March 22, 2018 at 1:54 pm in reply to: MultilingualPress language switcher in ENFOLD header widget area #931283okay, 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/March 21, 2018 at 5:02 pm in reply to: MultilingualPress language switcher in ENFOLD header widget area #930676thanks, 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?
March 20, 2018 at 3:04 pm in reply to: MultilingualPress & ENFOLD – compatible? Experiences? #929871Yes, I already searched the old forum posts – but I hoped, that there are some new informations on MultilingualPress.
Perhaps someone else?@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.
Works fine, thank you very much.
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.
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
February 24, 2018 at 1:09 am 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 usingget_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.
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?
February 22, 2018 at 9:12 pm 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
Update:
I figured it out, it was just a mistake in the CSS for the category image – it needed a height value.
— SOLVED —
February 22, 2018 at 2:10 pm in reply to: AVIA Custom HR with icon: width in % is ignored and is not responsive #916058Great, I changed it to 40% and it works fine now and responsive with equal line lengths, thank you, you can close the ticket.
February 21, 2018 at 8:49 pm in reply to: How to achieve the fading-in-effect of "av-special-heading"? #915693Great, I understand and reproduced this effect successfully, thank you!
February 20, 2018 at 11:44 pm in reply to: How to achieve the fading-in-effect of "av-special-heading"? #915119No :-)
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-headingHi 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:
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=followI thought of something like this:
https://kriesi.at/support/topic/add-new-or-custom-social-icon/Ah, I see, thank you, works fine!
February 18, 2018 at 9:36 pm in reply to: YOAST SEO Content Analysis for Avia Layout Builder #914017@rsm-dd no update?
@all any alternatives?
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:
February 14, 2018 at 7:57 pm in reply to: ENFOLD 4.2.3: "elements" can be saved as templates, but cannot be moved back #912440normally 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.
February 14, 2018 at 12:39 pm in reply to: ENFOLD 4.2.3: "elements" can be saved as templates, but cannot be moved back #912235Hi 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?
February 13, 2018 at 11:08 pm in reply to: How to add "edit" link for pages/posts in the functions.php? #911975Works perfectly, thank you very much, Nikko:
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' ); }
February 12, 2018 at 5:11 pm in reply to: How to add "edit" link for pages/posts in the functions.php? #911190That’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.February 10, 2018 at 5:56 pm in reply to: How to add "edit" link for pages/posts in the functions.php? #910585yes, 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 …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.
January 31, 2018 at 10:44 pm in reply to: Where to modify the "Recent-Comments-Widget" (not Combo-Widget)? #905857there is no file named “recent comments widget”?!?!?
- Right after
-
AuthorPosts