Forum Replies Created
-
AuthorPosts
-
Hi Ismael,
it works! Thank you very much! The ticket can be closed.
I think the previous version (I don’t see the difference to the last version) may have worked, too, as I had a cashing problem and the update of the page / functions.php just wasn’t transmitted.
Anyway: Thanks again. I recommend to include this script as a part of a new feature in a coming version.
Best regards from Cologne,
JoergThank you very much, Ismael.
As I tried to explain above, I already did it.
First I copied the code from the Email, which made the Website crash. Then I extracted the functions.php via Filezilla from the Enfold child diretory, deleted the “add filter” code, and the website worked as before.
Then I copied your original code directly from this forum via my Notepad++ editor to the end of the functions.php and copied it via Filezilla into the Enfild child directory. Result: None of the logo files (the paths are correct) is displayed.
Then I removed your code from the functions.php (via Notepad++ and ftp / Filezilla) and tried it within the WordPress Backend environment. I started the WorfdPress Theme Editor, opened the functions.php file and copied your code from the forum, in a first attempt directly and in another attempt via pastebin.com.Same Result: With your code none of the logo files is displayed.
Could you just login into the WordPress installation and check it?
Thanks in Anvance,
Joerg
Hello Ismael,
thanks for the answer.
After inserting your code (that I received via email notification) at the bottom of the functions.php of the Enfold child theme, the website crashed. All you saw was a white page with this error message:
Parse error: syntax error, unexpected ‘&’ in /var/www/web265/html/wordpress/wp-content/themes/enfold-child/functions.php on line 31
Even a login wasn’t possible anymore. I got access to the functions.php file via my ftp client, deleted your code, and now (after an interruption of just 1 minute) the website works again.
Meanwhile I compared the code you posted here in the support section with the code that was displayed in my email. Apparently your mail server changes the content of your support system when it sends it via email. This is what my email displayed (take a look at teh following code in edit mode: lots of inserted “'”):
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo)
{
$lang = pll_current_language('locale');switch ($lang) {
case 'en_GB':
$logo .= "https://www.bafatex.com/wp-content/uploads/2017/10/logo-en-400×100.jpg";
break;
case 'de_DE':
$logo .= "https://www.bafatex.com//wp-content/uploads/2017/04/logo400x100-1.jpg";
break;
}
return $logo;
}So maybe you check your email server for configuration problems?
After using the code you posted here in the support section, the english logo file isn’t displayed. This is the complete functions.php:
————————————————
<?php/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/add_shortcode(‘produktberater_de’, ‘produktberater_de’);
function produktberater_de(){
$sprache = 0;
ob_start();
require __DIR__ . “/konfigurator/produktberater.php”;
$res = ob_get_contents();
ob_end_clean();
return $res;
}add_shortcode(‘produktberater_en’, ‘produktberater_en’);
function produktberater_en(){
$sprache = 1;
ob_start();
require __DIR__ . “/konfigurator/produktberater.php”;
$res = ob_get_contents();
ob_end_clean();
return $res;
}/* logo language switch */
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
$lang = pll_current_language(‘locale’);switch ($lang) {
case ‘en_GB’:
$logo .= “https://www.bafatex.com/wp-content/uploads/2017/10/logo-en-400×100.jpg”;
break;
case ‘de_DE’:
$logo .= “https://www.bafatex.com/wp-content/uploads/2017/04/logo400x100-1.jpg”;
break;
}
return $logo;
}
————————————————————————The language codes seem to be correct, as you can see at https://www.bafatex.com/wp-content/uploads/2017/10/polylang-language-settings.jpg
Do you have an idea how to fix the problem that the english version is not displayed?
Best regards,
Joerg Gastmann
Cologne, Germany- This reply was modified 7 years, 1 month ago by JGastmann.
Hi,
the customer approved the solution. So we can close this topic / ticket.
Thank you very much!
May 23, 2017 at 11:18 am in reply to: How can I subdivide a layout element / container horizontally into sub-columns? #798175Hey Rikard,
if you have a CSS and shortcode solution I will like to give it a try.
Thanks in advance,
Joerg Gastmann
May 17, 2017 at 10:20 pm in reply to: List alignment problem in sidebars, list-style-position:outside doesn't work #795120Great! Thank you so much for solving the problem!
So this support ticket / case can be considered as closed,
May 15, 2017 at 9:41 pm in reply to: List alignment problem in sidebars, list-style-position:outside doesn't work #793532After a backup with “Duplicator” I took the risk to deactivate all plugins. The problem stays the same. By the way: The sidebar lists e.g. under http://www.bafatex.com/wordpress/en/test/ (even when written with the WP text editor) look even worse in Chrome than in Firefox (larger margins between text and bullet points of the ul).
In the private content section I give you admin access.
Thanks a lot in advance,
Joerg Gastmann
- This reply was modified 7 years, 6 months ago by JGastmann.
May 13, 2017 at 7:25 pm in reply to: List alignment problem in sidebars, list-style-position:outside doesn't work #792771I deleted the first text widget done with TinyMCE. So now there are just 2 sidebar text areas both written with the WordPress Core Text Widget.
Your example is what I’m looking for. Which of the 7 plugins touches the WordPress Core Text Widget?
May 13, 2017 at 4:35 pm in reply to: List alignment problem in sidebars, list-style-position:outside doesn't work #792741At http://www.bafatex.com/wordpress/en/test/ you see 2 text widgets in the sidebar. The first one is created with the TinyMCE Widget Plugin. The second one is created with the standard WordPress text widget, and it shows the same problem. How could the TinyMCE Widget Plugin cause the problem at the WordPress text widget?
Moreover I use TinyMCE Widget – which is one of the most popular WP plugins – in every of lots of WP installations I configured. The problem with list alignments in sidebars happened only in the one with the Enfold Theme.
Deactivating TinyMCE Widget could mean that I lose all the content of the many sidebar text areas I created with it. The customer wants to go live on tuesday.
Within the test page, I switched the sidebar settings from “Standard Layout – activates Enfold Child > sidebar” to “sidebar right”. The problem stayed the same.
The active plugins are:
- Black Studio TinyMCE Widget
- Contact Form 7
- Polylang
- Redirection
- Rename wp-login.php
- TinyMCE Advanced
- Yoast SEO
All of them are well established in lots of installations. None of them has anything to do with sidebar content, I need all of them, and I will probably lose content / page structures as soon as I deactivate them.
Do you have any other ideas? I can give you administrator access, but you must not deactivate the 7 plugins above, as I might lose a lot of my work.
- This reply was modified 7 years, 6 months ago by JGastmann.
I’m still waiting for the approval of the customer. As soon as I get it (hopefully within the next week) the tiptic can be closed. I’ll let you know immediately.
Hi Victoria,
it’s not a really responsive solution and the most elegant way, but this workaround seems to be sufficient for my customer (the sales director said it’s ok, the managing director has to give the final approval).
Depending on the width of the screen the width of the id selector #full_slider_1 .avia-slideshow-inner my cause either a distortion of the image, or it cuts off its left and right borders. In this case I lowered the height to 100px, and it looks ok in a width of 320px, but it’s cut off in a width of e.g. 400 or 500px (tablet portait screen).
Whatever: Your CSS solution seems to be sufficient for my customer. Thank you very much for your support!
I give you admin access (login data: see private content)
It doesn’t matter which layout elements or media elements have to be used. It doesn’t have to be a color section, but the color section is the only element that gives me what my customer wants: A header image with the width of the full content width (main content plus sidebar). The only thing that doesn’t work here is the empty space that grows in height in proportion of narrowing the browser window / screen size.
Take a look at the page “Das Unternehmen” (http://www.bafatex.com/wordpress/de/das-unternehmen/). I tried every kind of image, slider and gallery that is available in the Enfold theme. None of them fits. I left 4 of them that you will see on the page:
- slide show full width: image is too wide (full screen instead of max-width of main content plus sidebar, which is 1.000px), padding-bottom / margin-bottom seems ok
- simple slider: image is too narrow (stops at the border of the right sidebar), padding-bottom / margin-bottom is too high for every screen size
- simple image: same problem as simple slider
- color section: perfect width on all screen sizes, but empty space grows in height in proportion of narrowing the browser window / screen size
I limited the width of the “slide show full width” and centered the alignment by using this CSS:
.avia-slideshow-inner {
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}Only problem here: The small / smartphone screens show the full height instead of the full width and display the center of the image. Which looks suboptimal, showing just the entrance instead of the whole building.
So what do you suggest?
Best regards,
Joerg Gastmann
- This reply was modified 7 years, 8 months ago by JGastmann.
I tried
.avia-section {
min-height: 250px !important;
}with this and all other classes from the html / CSS code – no effect.
At https://kriesi.at/support/topic/spacing-between-sections/ I see that someone who uses enfold at http://marqueeroofrollers.co.uk/ had the same problem (like many others), and in that case the solution was:
.page-id-734 #av_section_1 .hr {
margin-top: 0 !important;
}
.page-id-734 #av_section_1 .content {
padding-top: 0 !important;
}
.page-id-734 #after_layer_slider_1 .content {
padding-top: 30px !important;
padding-bottom: 0px !important;
}But in my case this doesn’t work, as http://marqueeroofrollers.co.uk/ is just a single page Website.
#av_section_1 .hr {
margin-top: 0 !important;
}
#av_section_1 .content {
padding-top: 0 !important;
}
#after_layer_slider_1 .content {
padding-top: 30px !important;
padding-bottom: 0px !important;
}didn’t work as well.
Hi Victoria,
thank you very much for your answer and your efforts! Unfortunately it didn’t change anything. On the PC Browser everything is still fine, but if you take a look at the pages by smartphone you will see a lot of empty space underneath the header image (coming from the color section / Farb-Sektion).
I would have been surprised if it worked, because the CSS selectors fullscreen_slider_0 .avia-slideshow-inner are not part of the soucecode environment of the image on the html/php page, which looks like this on http://www.bafatex.com/wordpress/de/das-unternehmen/:
<div id=”av_section_1″ class=”avia-section main_color avia-section-no-padding avia-no-border-styling avia-full-contain avia-bg-style-scroll avia-builder-el-0 el_before_av_one_full avia-builder-el-first av-minimum-height av-minimum-height-custom container_wrap sidebar_right” style=”background-repeat: no-repeat; background-image: url(http://www.bafatex.com/wordpress/wp-content/uploads/2017/03/bg_unternehmen-1.jpg); background-attachment: scroll; background-position: top center; ” data-section-bg-repeat=”contain”><div class=”container” style=”height:250px”><main role=”main” itemprop=”mainContentOfPage” class=”template-page content av-content-small alpha units”><div class=”post-entry post-entry-type-page post-entry-257″><div class=”entry-content-wrapper clearfix”></div></div></main><!– close content main element –></div></div>
You can see the empty space underneath the image grow when you just grab the right border of the browser window with your mouse. Pull it to the left to decrease the width of the window. Do you see what happens underneath the image?
Could the solution lie in altering some of the CSS selectors above? Or a media query? Or does it have to be an “add filter” php extension to the functions.php file of the child theme? If so, it would probably be quite difficult to define images and their display formats for each single page.
Best regards
- This reply was modified 7 years, 8 months ago by JGastmann.
-
AuthorPosts