Mario Santos
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Google page speed insighs detection results related issuesHello @mason5666!
If I am not mistaken, from what I understand from this guide, Google expect any link tag
<a>
to have a validhref
and that’s why it is returning that error.I would suggest adding a
href
pointing to the proper url and, in case you don’t want to point to any url, you can maybe try using#
.Hope that helps.
Forum: Fixing WordPress
In reply to: Can’t access WordPress dashboardHello @maribatha!
According to the logs, it seems there is an issue with the Essential Addons for Elementor plugin. I would recommend you uninstall that plugin to be able to access your dashboard and ask in their support forums how to fix the issue.
As you can’t access the dashboard to deactivate the plugin, you can try manually resetting it. If uninstalling that plugin doesn’t resolve the issue, you can deactivate all the plugins and reactivate each one individually until you find the cause.
If that doesn’t work either, you can access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to
/wp-content/themes/
and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).Hello @saeedwaqas!
From what I can see, it seems you are using Elementor Posts Widget, so assume you must change something there. I would recommend to ask in their support channels to get more detailed information.
Taking a quick look, I found this issue where they are talking about the same topic. Not sure if it is outdated but it seems they are solving it by creating a filter. I would recommend trying that approach or asking them for further information.
Forum: Developing with WordPress
In reply to: How to add Update WarningHello @jccpaymentsystems!
I guess it depends on where you want to show that warning. If I am not mistaken, when there is a new version available of any plugin installed, a warning like the following one is shown by default.
If that is not enough for your use case, there is also the admin_notices hook, where you can add a more detailed message at the top of your page. Something like:
function custom_admin_notice() { ?> <div class="notice notice-info is-dismissible"> <p><?php _e( 'Please update my plugin', 'sample-text-domain' ); ?></p> </div> <?php } add_action( 'admin_notices', 'custom_admin_notice' );
Hope that works for you!
Forum: Developing with WordPress
In reply to: Default block.json margin valuesHello @jonhecky!
It seems there is an issue with these default values in dynamic blocks. It has been reported in this GitHub issue and, apart from those reporting it there, I have been able to reproduce it as well. I already shared this ticket to keep track of it there, but I invite you to share your feedback and follow the discussion.
The only thing I can think of right now is to “workaround” it somehow with the following code, but this is far from being ideal, and we should probably wait until that issue is fixed in core. Sharing just in case it helps somehow.
<?php $marginTop = isset( $attributes['style']['spacing']['margin']['top'] ) ? $attributes['style']['spacing']['margin']['top'] : '100px'; ?> <div <?php echo get_block_wrapper_attributes(); ?> style="<?php echo "margin-top: " . $marginTop . ";" ;?>" > This is my block </div>
- This reply was modified 1 year ago by Mario Santos.
Forum: Fixing WordPress
In reply to: create url that leads to a fileHi @evgeniikoriagin!
I’m not 100% sure I’m getting you’re question, but if you have a JSON file in your WordPress site, you can just point to it by adding the
.json
extension to the route. Just like images.For example, imagine I have a file named
data.json
in theuploads
folder. If I navigate tomysite.com/wp-content/uploads/data.json
, it will be displayed as plain text, without any other content.Is that what you are looking for?
Forum: Fixing WordPress
In reply to: Modifying page URLsHi @garrettb !
I don’t know if there is a better way, but if you “only” have 20 or 30 pages, maybe you can update them using the Bulk Edit action in the Pages in WP Admin.
The way I would proceed would be something similar to this:
0. Before proceeding, I would remove the old “bands” page from the trash to avoid confusion.
1. Go to
https://www.yoursite.com/wp-admin/edit.php?post_type=page&parentId=10
. Make sure that you use your site URL and change theparentID
for the ID of your “bands” page. If you don’t know how to get your page ID, you can follow this guide. You could even use a plugin like Parent Page Filter as well. Which will provide an interface instead of modifying the URL.2. Once you have filtered all the pages you want to modify, you can check them all with the checkbox at the top-left corner. Next to “Title”.
3. Once all of them are selected, select Edit in the “Bulk actions” dropdown and click on Apply.
4. It will open another menu where you can modify the Parent property to “bands” in bulk.
I would recommend doing a backup of your site before proceeding. Maybe you can also try with a couple of pages first to ensure it is working as expected, and, once you feel confident, do it for the rest.
Hope it helps, and you can solve it!
- This reply was modified 2 years ago by Mario Santos.
Hi @rose18!
I believe that the second snippet is not working because the
global $post
, used byget_post_type()
function, hasn’t been initialized yet in the hook you are using,wp_loaded
.The good news is that, if I am not mistaken, you don’t need to do that check. You could directly modify the
global $wp_post_types
variable using theadmin_init
hook. Something like this should work:function change_post_type_labels() { global $wp_post_types; $wp_post_types['post']->labels->set_featured_image = "Set featured image (540px x 350px)"; $wp_post_types['news']->labels->set_featured_image = "Set featured image (600px x 350px)"; } add_action('admin_init', 'change_post_type_labels');
Of course, test it yourself before implementing it on your site. Hope that helps!
- This reply was modified 2 years ago by Mario Santos.
- This reply was modified 2 years ago by Mario Santos.
I’ve been thinking about this, but I am still unable to reproduce it. I rolled back my local site to 6.0.3 and everything seems to work the same way. My only guess is that some versioning could be affecting somehow, but I don’t think that should be the case.
Could you try to update your child theme version, just in case? You can do that in its
style.css
file.From what I am seeing, if you go to the browser Dev Tools while editing a post, you should find a
<style>
HTML element with your CSS inside a<div>
with the classis-desktop-preview
. The HTML should look similar to this:<div class"is-desktop-preview" style="..."> <style>...</style> <style>...</style> <style>YOUR STYLES</style> </div>
Could you check if you can find that in the HTML? If it is there, but it isn’t applying, it may be overwritten somehow. I’m running out of ideas.
Forum: Fixing WordPress
In reply to: I am unable to apply the featured image in full widthHi @tiputheroy!
Could you confirm if the code finally worked or if the support from GeneratePress helped with that, please?
Forum: Fixing WordPress
In reply to: I am the only one who is facing this issueSorry to hear it was SQL Injection. I’m not an expert on that topic, so I’m not sure I will be able to help here. I’ve added a couple of tags to ask for help in the www.ads-software.com Hacked or Malware forum. Apart from that, I would recommend going through this guide if you haven’t done it yet.
In case it helps, I found the following articles suggesting a similar solution as a first step:
* How to fix and Prevent SQL Injection in WordPress
* WordPress SQL injection – SQL Attack Prevention GUIDEIt seems you should:
1. Look out for a table named
Sqlmap
and, if present, delete it.
2. Look out for new/foreign users in your database and, if present, delete them.
3. Change your passwords.Forum: Fixing WordPress
In reply to: How can I allow visitors to?download images?Oh, I may know what is happening. If I am not mistaken, it is not a problem with your websites but with the
webp
format. I believe that Windows apps don’t support this image format (only Paint does), and I used the browser (Chrome) as the default app to open it. That’s why it was working for me.Moreover,
webp
wasn’t supported in Safari until the latest macOS versions, so it was automatically changing the format toJPEG/PNG
. That’s the reason it’s working in Safari, I guess.I think that if you add another file extension to the filename while downloading, for example,
Afro-coin-gold-zoe-ada-2.png
, or if you open them with the browser or Paint, it should work.Forum: Fixing WordPress
In reply to: show time of post together with dateReally glad it helped! It’s actually kind of tricky, you are right all the examples are only using Y/M/D. I had to search for that.
You’re welcome!
Forum: Fixing WordPress
In reply to: Textcolor black on dark backgroundHi @santosguillamot
where do I find this file, where I can insert/change your suggestion?It is not a file, it is a setting in your WP Admin dashboard, so it is simpler I believe.
You can go to https://kish-live.de/wp-admin to go to the Admin dashboard. There, in the left sidebar, under Appearance, you should find the Customizer.
Once you are in the Customizer screen, in the left sidebar, go to The Events Calendar submenu, and to Global Elements. In that one, you should fine a setting to change the Event Title color if I am not mistaken.
Forum: Fixing WordPress
In reply to: remove category title doesn’t runI’m really glad it works! Happy to help!