Santiago
Forum Replies Created
-
Hi @semiii123,
In order to regain access to your site, you should log via FTP and remove the mu-plugin /wp-content/mu-plugins/endurance-page-cache.php
Is it some custom code you added? I see that it is calling a WP built-in method is_user_logged_in().
It should be defined, so I suspect you are invoking it before WP is fully loaded. If that is the case, you may want to move that piece of code into a hook handler.Let me know if you need further help.
Take careForum: Fixing WordPress
In reply to: setting the margin on homepageHi Lee,
In addition to what @gappiah explained, here you have an example on how to get rid of that padding:
.home .page-content { padding-left: 0px; padding-right: 0px; width: 100%; }Note that I’m using the .home class selector in front to make it more specific and therefore take precedence over the existing style rules.
Also, once you apply this code, you will need to adjust a margin in your slider since it is positioned taking the padding into account. Further more, you may want to modify the template (I assume you are coding this theme) and take the slider outside of the page-content container.
Last, I’m seeing and extra ‘}’ rendering at the bottom of your page.Hope it helps. Take care!
Forum: Networking WordPress
In reply to: Networked SiteHi @danny5,
As you probably already know, users table is shared across sites in a WP multisite install. This means that an user will have the same user login name and password for all the sites.
This doesn’t mean though that all the users will have access to all the subsites.In order to automatically add users to all the subsites in your network you may want to use this plugin https://wordpress.org/plugins/join-my-multisite/
That should be enough to achieve what you want.
Cheers!
Forum: Fixing WordPress
In reply to: Images appears as post/page and Getting Indexed on GoogleHi @sandy018,
Hope you are doing great.
I understand that you are talking about Attachment pages. This is totally expected. Every media item in wordpress is a post of type ‘attachment’ and has it’s own url/page.
Here is an useful article on how to disable or workaround this behavior:
https://www.wpbeginner.com/wp-tutorials/how-to-disable-image-attachment-pages-in-wordpress/Hope it helps. Take care
Forum: Networking WordPress
In reply to: wordpress network (multisite) – change URL of main siteHello there @c20h28o2,
Have you tried using a rewrite rule in your .htaccess?
Something like this should work:
RewriteRule ^ru/(.*)$ http://example.com/$1Hope it helps π
Hi @songsta,
Hope you are doing well.
Just out of curiosity, did you spot the cause of the issue?Forum: Fixing WordPress
In reply to: The media containing directory is not writable!Hello @salamzaban,
You shouldn’t modify options.php nor any other WP core file. If you want to change the Uploads folder you can use the following in your wp-config.php file:
define( 'UPLOADS', 'folder_name' );Regarding the permissions, it looks like your uploads folder was created by an user different that the one under which PHP process is running.
For the permission change command, make sure you make it recursive to all subfolders and files into the uploads folder.
Hope this helps π
Forum: Fixing WordPress
In reply to: Problem with DateTime – Plugin show other timeHello there @jpbenfica,
This sounds like an issue with daylight saving time.
I understand you set Lisbon under WP-admin > Settings > General > Timezone:
Is the time showing up correctly in other parts of the site? If so, it might be a problem on how that plugin get the current time.
If the time is affected for the entire site and if your settings are correct, then I’d suggest to remove any php.ini customization that you added, and check for a plugin/theme conflict. You can use this plugin to check in a live site without affecting users experience https://wordpress.org/plugins/health-check/.
Hope this helps π
Hi @songsta,
If you already tried the steps described in that link, then I would say that this is either a plugin/theme or your hosting messing with allowed mime types.
My first suggestion is to check for plugin/theme conflicts.
If that doesn’t work, check with your hosting. I’ve seen managed hostings adding mu-plugins to define things like this.
I’d love to know how it goes. Please keep me posted.
CheersForum: Fixing WordPress
In reply to: Plugin user group based priceHi there @michalrama,
You have two options here:
1- Customize the role based price plugin to look for the user group instead of user role. (you need to code or to hire someone to do so).2- Switch from user group plugin to something like this: https://wordpress.org/plugins/user-role-editor/
With that plugin, you can create custom roles and assign the same capabilities to each role. You will preserve the ‘grouping’, the privileges, and the role based price will do the rest.Hope it helps π
CheersForum: Fixing WordPress
In reply to: Gestione utenze pluginBuongiorno @danilomorganti,
A possible approach could be to use custom roles for this. You can have a role ‘cliente’ and a role ‘negozio’. (you will later grant access to different sections of the site based on the role).
In order to achieve this, you can use the following plugin to create the custom roles: https://wordpress.org/plugins/user-role-editor/
And this plugin to allow the user to choose the role during registration: https://wordpress.org/plugins/wp-roles-at-registration/
Another possible approach is to use a membership plugn (there are lots of them out there) and create a ‘client’ and ‘negozio’ subscriptions. Most of these plugins allows users to choose a subscription level during registration and also to show/hide content for specific subscription levels.
Hope this helps at least as a starting point π
Take care
Forum: Developing with WordPress
In reply to: problem with sending parameters in do_action@mostafadeveloper,
The call to wp_localize_script looks correct.
My first suggestion would be to change the name for your data from ‘rows’ to something more specificc to your plugin, in order to avoid collisions with other variables in the global scope.That said, it’s weird that rows is throwing an undefined error message.
Please check if the handle ‘tablebuilderforcsv-pagination’ is spelled exactly the same in the register/enqueue and in the localize methods.Once you do that, I would try invoking ‘rows’ by hand in the browser console (dev tools) to see if it is defined.
If you still can’t spot the problem, try adding a breakpoint (if you have a debugger configured) or a call to
<?php die('test'); ?>in the same line where you call the wp_localize_script method. This will help to confirm if that line is actually being executed or not.Keep me posted. Cheers!
Forum: Developing with WordPress
In reply to: problem with sending parameters in do_actionHi @mostafadeveloper, hope you are doing great today.
I believe there is a missconception in your apporach.
You can not redefine an existing hook by passing parameters. As you can see here https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head wp_head action is already defined and triggered by WP core without parameters.For the right apporach on how to implement JS for your shortcode please read here.
https://wpgurus.net/enqueue-scripts-style-sheets-on-shortcode-pages/And the right approach to pass variables to the be used by your script is to use the wp_localize_script() method.
https://codex.wordpress.org/Function_Reference/wp_localize_scriptLet me know if there is something unclear and I’ll try to provide further assistance.
Take care!- This reply was modified 7 years, 11 months ago by Santiago.
Forum: Fixing WordPress
In reply to: jquery for child themeHi @nabeelahs,
‘parent-style’ is a placeholder that you need to replace with the right name.
It refers to the ‘handle’ of the registered style. In order to understand how this works, I recommend you to read this https://codex.wordpress.org/Function_Reference/wp_register_styleBasically, you need to steps to laod an script/style in WP: first you need to *register* nad then you need to *enqueue*. In many cases, these two steps are simplified in the enqueue method by passing the file path. But you can *register* the path using a ‘handle’ or ‘alias’. Once the path is registered, you can then enqueue it using just the ‘hadle’ so that you don’t need to know the path.
For instance, if you need to enqueue jQuery, you can siply cal wp_enqueue_script(‘jquery’), because WP Core already registered the jQuery library path under the alias ‘jquery’.That said, you need to look into yout parent theme code and see what is the ‘handle’ or ‘alias’ used when the style is enqueued and use that in your code.
‘Version’ parameter is used to avoid browser cache when a file is modified. This value will be added as a query parameter at the end of the style/script path. It is optional, but I’d recommend to use it. Take a look at the description of the parameter *$ver* in the link that I pasted above for more details.
Have a great day. Cheers!
Forum: Fixing WordPress
In reply to: Visual editor is not working.Hi @locateanup,
What you describe is certainly weird, and is hard to diagnose with so little information.
As per what I see in the screenshot, there is probably a resource not loading or a javascript error preventing the editor to load properly.
I’d suggest as first step to clear browser cache and try again to make sure there isn’t something stored in your browser. That could explain why the problem occurs only with that domain.If that doesnt work, it would be useful if you can take a look at the browser dev tools console to see if there is any error message that can help us to spot the cause.
In case you don’t know how to access the console, here is a guide on how to do it in chrome https://developers.google.com/web/tools/chrome-devtools/console/get-startedLet me know when you have this information.
Cheers!