ksvgn2018
Forum Replies Created
-
Okay, I sent a report of site health using your support link. ??
I also tried it with Goole Chrome, no success. For other projects it was never a problem, no matter which browser I was using.
Thank you for your reply. The only relevant firewall plugin would be Wordfence Security that I also use in my other projects. I disabled it temporarily but still no success. There is no firewall activated for the domain from the hoster, it is a bonus option but it hasn’t been booked.
The domain is:
https://traeumchen-kassel.de
Here is a screenshot showing the issue:
https://traeumchen-kassel.de/screenshot.pngUnfortunately there is no error log that would give further details regarding the source of the error, the status just says “Failed”.
Forum: Reviews
In reply to: [Contact Form 7] This plugin slows the site down by secondsEspecially in combination with Google reCAPTCHA. I’m using another plugin for supporting reCAPTCHA v2 which I was hoping CF 7 would also do but no matter which version it is, the script is loaded on page load and not – as it should be in 2023 – lazyloaded when e.g. focusing a form field.
I would really like to use CF 7 in the future but page speed is so important. If this doesn’t change, I have to switch to another plugin for my next project.I was referring to an external stylesheet, yes. In your docs it says:
The Smush CDN will serve background images using the following methods:
https://wpmudev.com/docs/wpmu-dev-plugins/smush/<img src="imagepath/image.jpg" /> or <div style="background-image: url(imagepath/image.jpg);">Something</div> or <div class="my-class">Something</div> <style>.my-class { background-image: url(imagepath/image.jpg); }</style>
So it works with inline styles – not only for images but also for elements with a defined background image?
Forum: Fixing WordPress
In reply to: Featured image Media Upload not showing in posts/pagesUpdate: After deactivating and then reactivating all of my Plugins the media uploader appeared again magically as if it was never gone. I did not change anything, it seems to have been an installation/updating issue and I will probably never find out in detail what actually caused it. Happy to see the media function again after a frustrating half day of extra work.
Forum: Plugins
In reply to: [User Role Editor] Translating custom user rolesPerfect, great plugin and great support! ??
Forum: Plugins
In reply to: [Yoast SEO] YOAST SEO creates unwanted fields in the user profilesThank you, Michael. I really appreciate all the work you put into this great plugin and this fix would be more than welcome since I don’t see the connection of these extra fields to what an SEO plugin should actually do. Or am I missing something?
Forum: Plugins
In reply to: [Polylang] Multiple translations for one string in the same languageThank you! Why didn’t I know this function? Perfect solution. ??
Forum: Developing with WordPress
In reply to: Add extra text to user contact methodsThanks, in fact I use a similar function for showing “gender” and “self description” fields. There I can edit the template directly in PHP/HTML as it is portrayed in your link.
But I want to be able to use wp_get_user_contact_methods() in frontend and collect all available options there for a counter variable. This is only possible when they are actually saved in user_contactmethods.
I now ended up like this:
functions.php
function load_custom_wp_admin_scripts() { // Admin CSS wp_enqueue_style('ksv-admin-style', get_template_directory_uri().'/style-admin.css', array(), '1.0.0'); // Contact information jQuery Script wp_enqueue_script('ksv-custom-admin', get_template_directory_uri().'/js/ksv-custom-admin.js', array ('jquery'), '0.0.1', true); $translation_array = array( 'emailpublic_text' => __('E-mail address (public)', 'ksv'), 'facebook_text' => __('Facebook profile URL', 'ksv'), 'instagram_text' => __('Instagram profile URL', 'ksv'), 'pinterest_text' => __('Pinterest profile URL', 'ksv'), 'linkedin_text' => __('LinkedIn profile URL', 'ksv'), 'twitter_text' => __('Twitter profile URL', 'ksv'), 'tumblr_text' => __('Tumblr profile URL', 'ksv'), 'wikipedia_text' => __('Wikipedia profile URL', 'ksv'), 'youtube_text' => __('YouTube profile URL', 'ksv'), 'website_text' => __('Website URL', 'ksv'), 'soundcloud_text' => __('Soundcloud profile URL', 'ksv'), 'myspace_text' => __('Myspace profile URL', 'ksv') ); wp_localize_script('ksv-custom-admin', 'additional_admin_info', $translation_array); } add_action('admin_enqueue_scripts', 'load_custom_wp_admin_scripts');
wp_localize_script() is necessary to create translatable text, that’s why in jQuery it says for example ‘additional_admin_info.emailpublic_text’ instead of just ‘E-mail (public)’. I’m working with at least two languages and my theme has its own language files, of course you could decide to leave out that $translation_array and wp_localize_script() part if you don’t use translations.
ksv-custom-admin.js
jQuery(document).ready(function() { jQuery('tr.user-emailpublic-wrap input#emailpublic').after('<span class="cm-additional-text">'+additional_admin_info.emailpublic_text+'</span>'); jQuery('tr.user-facebook-wrap input#facebook').after('<span class="cm-additional-text">'+additional_admin_info.facebook_text+'</span>'); jQuery('tr.user-instagram-wrap input#instagram').after('<span class="cm-additional-text">'+additional_admin_info.instagram_text+'</span>'); jQuery('tr.user-linkedin-wrap input#linkedin').after('<span class="cm-additional-text">'+additional_admin_info.linkedin_text+'</span>'); jQuery('tr.user-myspace-wrap input#myspace').after('<span class="cm-additional-text">'+additional_admin_info.myspace_text+'</span>'); jQuery('tr.user-pinterest-wrap input#pinterest').after('<span class="cm-additional-text">'+additional_admin_info.pinterest_text+'</span>'); jQuery('tr.user-soundcloud-wrap input#soundcloud').after('<span class="cm-additional-text">'+additional_admin_info.soundcloud_text+'</span>'); jQuery('tr.user-tumblr-wrap input#tumblr').after('<span class="cm-additional-text">'+additional_admin_info.tumblr_text+'</span>'); jQuery('tr.user-twitter-wrap input#twitter').after('<span class="cm-additional-text">'+additional_admin_info.twitter_text+'</span>'); jQuery('tr.user-website-wrap input#website').after('<span class="cm-additional-text">'+additional_admin_info.website_text+'</span>'); jQuery('tr.user-wikipedia-wrap input#wikipedia').after('<span class="cm-additional-text">'+additional_admin_info.wikipedia_text+'</span>'); jQuery('tr.user-youtube-wrap input#youtube').after('<span class="cm-additional-text">'+additional_admin_info.youtube_text+'</span>'); });
style-admin.css (I also added some FontAwesome icons and additional styling but just to show the essential part):
.cm-additional-text { padding-left: 20px; font-style: italic; }
So that’s how I’ve done it, it works for me and I just wanted to document my progress here in case someone else wonders how this can be achieved. I wanted to make sure that there is no easier or better solution for my scenario, thanks again. ??
Forum: Developing with WordPress
In reply to: Add extra text to user contact methodsAnd to your last reply: In some cases it could be misleading because what will be displayed as just “E-mail” in frontend is actually the public e-mail address of that user, not to be confused with the necessary e-mail address of that profile. So it would be nice to have that additional text option.
With Instagram, Twitter and so on some editors might just supply a user name, also to prevent confusion the addtional “profile URL” part should be added as backend only text.
Forum: Developing with WordPress
In reply to: Add extra text to user contact methodsThis is a jQuery solution that works:
jQuery(document).ready(function() { jQuery('tr.user-emailpublic-wrap input#emailpublic').before("<p>Test</p>"); });
Of course I had to enqueue the newly created .js file like this:
function load_custom_wp_admin_script() { wp_enqueue_script('ksv-custom-admin', get_template_directory_uri().'/js/ksv-custom-admin.js', array ('jquery'), '0.0.1', true); } add_action('admin_enqueue_scripts', 'load_custom_wp_admin_script');
So if there is no easier solution without JS I would just do it like that. Position of the text and tags are temporary for testing purposes.
Forum: Developing with WordPress
In reply to: Add extra text to user contact methodsNo, sorry I meant it like that: I want to display the input fields for example like this in the backend:
Instagram [ INPUT FIELD ] (some additional text)
The “some additional text” part could be over or behind the input field, it’s just so that in the backend an editor would know that he/she should provide the “Instagram profile URL” or the “Wikipedia page url” etc.
I don’t need any other additional fields that only an admin can see.
Forum: Fixing WordPress
In reply to: Bug: Gutenberg editor deletes classes of list elementsThank you! Hope this will be fixed since it’s a major bug that can cause a lot of damage with bigger lists. With anchors I experienced it too by the way. Classes were deleted or the anchor was recreated using a syntax were class appeared first like this:
<a class="xxx" href="xxx" ...>Text</a>
The exact position of class doesn’t matter of course but maybe it’s related to the same issue.
The visual editor in Gutenberg lacks of the capability of giving elements classes anyway (one or multiple), so for editors who are not familiar with html/css it’s a problem. With the current issue even more since they wouldn’t know what happened when classes are deleted and might save the post/page since everything looks exactly the same in backend.
Forum: Plugins
In reply to: [Contact Form 7] Loading icon leaves empty space when inactiveI found a simple solution after checking the JS and CSS. ‘.content-box’ is a custom div container that I use in my theme. Any parent element on a higher level that is not affected by classes or ids of Contact Form 7 would work. Or alternatively make the CSS rules ‘!important’.
.content-box .wpcf7-spinner { display: none; } .content-box form.submitting .wpcf7-spinner { display: block; }
Thank you for your reply. The request exists since Dec. 2020. As someone (and now me) pointed out in the comments on July 19, 2021, it’s not valid HTML. This seems to be a serious issue, your dev team should address this, it’s causing sites to be checked as invalid HTML.
I will try to get it out of the source code with buffering and preg_match() but that will create unnecessary loading time and can only function as a workaround. Please make this a priority. ??