threadi
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Sanitize binary bits. Binary for Post-Quantum decryptionGreat that you were able to adapt this for your needs. It took me a while to figure it out back then, but this is a perfectly logical and reliable way to serve files.
Texts that are output via JavaScript can be made translatable in WordPress in various ways:
The simplest method is probably wp_localize_script(). With this function, you pass a JavaScript object containing the text to be translated to a script handler. You can find examples in the linked manual.
Another approach would be to embed the translation directly into JavaScript using
__(). To do this, you need to import WordPress’s own JavaScript package into your JavaScript:import {__} from "@wordpress/i18n";This, in turn, requires that you generate your scripts. See: https://learn.ww.wp.xz.cn/tutorial/installing-node-js-and-npm-for-local-wordpress-development/
For texts that are displayed after an AJAX request, I now take a completely different approach. I include the texts in the AJAX response and then display them. This allows the translation to remain entirely in PHP.
Forum: Developing with WordPress
In reply to: Sanitize binary bits. Binary for Post-Quantum decryptionI understand your frustration here. I’ve been there myself. In one of my plugins, I return files in a similar way – mostly images, but also PDFs.
It’s important to note that you shouldn’t use PHP’s built-in functions to read and output the files. WordPress provides
WP_Filesystemfor this purpose: https://developer.ww.wp.xz.cn/reference/functions/wp_filesystem/In my case, I use this (simplified) code, for example:
require_once ABSPATH . '/wp-admin/includes/file.php'; // @phpstan-ignore requireOnce.fileNotFound
require_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-base.php'; // @phpstan-ignore requireOnce.fileNotFound
require_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-direct.php'; // @phpstan-ignore requireOnce.fileNotFound
\WP_Filesystem();
global $wp_filesystem;
// return header.
header( 'Content-Type: ' . $mime_type );
header( 'Content-Disposition: inline; filename="' . $filename . '"' );
header( 'Content-Length: ' . wp_filesize( $file ) );
// return file content via WP filesystem.
echo $wp_filesystem->get_contents( $file ); // phpcs:ignore WordPress.Security.EscapeOutput
exit;Maybe this will help you with your situation.
Forum: Fixing WordPress
In reply to: Making wordpress workI hadn’t realized that your issue was with deactivating Jetpack. If you’re having trouble with this plugin, I’d recommend reaching out to their support forum: https://ww.wp.xz.cn/support/plugin/jetpack/ – there are more people there who are familiar with the plugin and can better assist you.
Forum: Fixing WordPress
In reply to: Making wordpress workHow well a WordPress-based website performs depends primarily on the plugins you use as well as the theme. WordPress performs very well without plugins and with a default theme. So you should check your project to see what’s causing the slow loading times.
Here’s an article on the topic: https://developer.ww.wp.xz.cn/advanced-administration/performance/optimization/
My recommendation is to first see what optimization options are available or offered by your current setup. Some themes also have their own caching features. Removing older plugins that no longer perform as well as they should today can also help.
After that, you can look into using one of the free plugins to optimize your website’s output: https://ww.wp.xz.cn/plugins/search/optimize/ – it’s hard to say which one is best in general. It always depends on the project’s structure.
Forum: Fixing WordPress
In reply to: PHP code snippetThe code as it stands is likely to cause problems. I’d be interested in seeing the specific instructions you received. Where can I find them?
By the way, here’s a general German-language support forum: https://de.ww.wp.xz.cn/support/forums/
Forum: Fixing WordPress
In reply to: Probleme mit dem ElementorIn your video, you’re launching the Block Editor instead of Elementor. To use Elementor to edit your pages, you’ll need to either click the large “Mit Elementor bearbeiten” button at the top of the Block Editor or click “Bearbeiten mit Elementor” in the page list where you were previously.
By the way, if you have general questions about WordPress, feel free to use the German-language forum: https://de.ww.wp.xz.cn/support/forums/
Forum: Fixing WordPress
In reply to: Website Not UpdatingI can see that the content should be different. It’s strange that it’s not showing up.
When you say it shows up for you, do you mean in your backend while editing, or on the frontend when you’re logged in?
To rule out possible causes, I’d recommend first deactivating the LiteSpeed plugin. If it’s still not visible then, it could also be due to other caching plugins you’re using that I can’t identify right now. If you don’t have any others, you could try deactivating all plugins to rule them out as a cause altogether.
If it still doesn’t update, the Nginx cache mentioned by LiteSpeed Support could be the reason. In that case, however, it would be strange that you can see the new content – which suggests it’s not the Nginx cache. If it is the cause, you’ll need to contact your host’s support team for clarification.
Forum: Fixing WordPress
In reply to: Need help with Elementor builderI recommend getting in touch with Elementors’s support about this via https://elementor.com/support/ since you are using a commercial plugin which could not be supported here in the forums.
Forum: Plugins
In reply to: [Classic Widgets] Widget ScreenThe plugin enables the classic view of widgets in the backend. As a result, the frontend display will naturally be limited to the options offered by these classic widgets.
As a result, you will no longer be able to use the features that blocks offer in the frontend. You will then have to style elements using custom CSS instead of using the options available in blocks.
Of course, a classic theme is always a prerequisite. Modern block themes do not support widgets.
Forum: Fixing WordPress
In reply to: Erreur critique sur mon site internetYou’ll need to check with your team. This is a contractual matter between your project’s hosting provider and your organization. WordPress can’t help with this.
It might be helpful to ask your team who pays the hosting bills – who handles that and is therefore the contractual partner.
Forum: Fixing WordPress
In reply to: Removing bullets from “Latest Posts” blockYou can do this with the following CSS:
.wp-block-latest-posts.wp-block-latest-posts__list.is-grid li { list-style: none }You’ll need to add this to your theme as custom CSS. Since you’re using the Kadence theme, they have instructions for this here: https://www.kadencewp.com/help-center/docs/kadence-theme/add-custom-css/
Forum: Fixing WordPress
In reply to: Problem with PHP and admin email on very old theme!There are often several ways to solve a problem. If editing the code works for you, that’s fine.
You can change the admin email address in several ways:
- Use phpmyadmin from your hosting control panel. Open the “options” table (has a prefix like “wp_” and change the value of “admin_email” to your address.
- Or go to
/wp-admin/options.php. Search for “admin_email” and enter the new address there. Save the form then. - Or use the plugin: https://ww.wp.xz.cn/plugins/change-admin-email-setting-without-outbound-email/
Forum: Fixing WordPress
In reply to: Clean database after been hackedMy recommendation: first read this article:
FAQ My site was hacked
After that I would recommend checking whether you still have a clean backup. If necessary, ask the support of your hoster. If so, delete all files and the database and restore the backup. Then change all access data in the hosting (also FTP, hosting login ..).
So if you still have a clean backup of your website, use that.
The alternative is a tedious process of manual cleanup. No one will be able to tell you exactly what you need to do. A hacker can hide their code anywhere. Simply removing an entry from the database won’t be enough. This approach is very time-consuming. There are also expensive service providers who can help with this kind of thing.
Forum: Fixing WordPress
In reply to: Problem with PHP and admin email on very old theme!The theme you’re using is actually 16 years old. Yes, it’s time to switch it out.
Theoretically, you can use any other theme. I would recommend the following approach:
- First, create a backup of everything. This is very important. If you don’t have a plugin for this, ask your hosting provider if they create backups and how to use them in an emergency.
- Then use this plugin to create a copy of your project on your hosting: https://ww.wp.xz.cn/plugins/wp-staging/
- In this copy, change the theme to one you want to use instead, just to test it out. For example, you could use the latest classic default theme, “TwentyTwenty-One.” This is very simple, but you can first check whether it’s generally possible with your content.
- Once you’ve found a way to do this, you can either revert the changes using WP Staging or make the changes directly on the live site.
- Only then should you try changing the PHP version again. However, the plugins you’re using might also cause issues. Make sure everything is up to date and that you’re not using any plugins older than 2–3 years.
As an alternative to this approach, you can, of course, run the tests directly on your website using a new theme. Depending on how long that takes, however, your website might literally look like a construction site to visitors during that time.
If you get stuck on anything along the way, you can also seek personal assistance. You’re sure to find someone here: https://jobs.wordpress.net/
Forum: Fixing WordPress
In reply to: Erro de redirecionamento do wp-admin após restauração de backupYour website’s domain is set to
https://brasilyacht.com.brin WordPress. However, you are using the domain
https://brasilyacht.brSince your backend is unavailable, you will need to update the information in the database. To do this, access phpMyAdmin as described by your host, HostGator, here: https://www.hostgator.com/help/article/phpmyadmin – if you have any questions, contact their support.
In phpMyAdmin, you’ll need to find the
optionstable (it has a prefix that’s specific to your WordPress installation; it might just bewp_). There you’ll find the entries forsiteurlandhome. You’ll need to update the domain name in both of these. Save your changes and then go to the backend – it should work right away.