one3rdnerd
Forum Replies Created
-
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] If Menu blocks Appearance > MenusGlad to hear it @oliverfritsch
I use the the Code Snippets plugin, in that one, you can just set it to only run in the dashboard on the right sidebar, so the is_admin() isn’t needed. I guess it depends on your plugin. Thanks for sharing though as that might be useful for others that don’t have that control.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] If Menu blocks Appearance > MenusYou’re welcome.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] 504 Gateway Time-out@jonkastonka No worries, I literally posted that solution a few minutes before I shared it here.
I was going to open a new thread and saw several with what seemed like the same issue. Solved it, shared on one and then posted the links to the others, so everyone got the notification.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] PRO stopped workingPerhaps try the method I added in https://wordpress.org/support/topic/if-menu-blocks-appearance-menus/#post-18739474
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] Gateway TIme OutRather than edit the core plugin files, try this method I shared using a separate PHP function that blocks the API call to the dead website. https://wordpress.org/support/topic/if-menu-blocks-appearance-menus/#post-18739474
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] 504 Gateway Time-outI’m sure Johan’s method works fine too but if you don’t want to edit the plugin files, running the external php function I shared on https://wordpress.org/support/topic/if-menu-blocks-appearance-menus/#post-18739474 fixes this issue too. IMO, it’s easier to add it this way and not touch the plugin files.
Forum: Plugins
In reply to: [If Menu - Visibility control for Menus] If Menu blocks Appearance > MenusJust came here to submit a similar bug, for me it does load but it takes over a minute. I installed the Query Monitor plugin to see what’s going on and it seems to make an http API call to
https://layered.market/get-plan?site=https%3A%2F%2Fannapflourishfitness.com&for=if-menu&_nonce=692eee0d6ec75&licenseKey=
I believe this is what is making the page hang.Testing this URL and the homepage https://layered.market/ leads to a Cloudflare Gateway time-out error, so I’m guessing this plugin has been abandoned, along with the domain too.
As this plugin hasn’t been updated for 12 months and several other people have reported similar issues with 0 replies over the past couple of weeks.
Long term, we may need to replace this plugin.
Short term, I have a PHP fix.
Add this snippet and set it to only run in the dashboard (as it’s not needed on the front end)
I added this and now the appearance > menus page loads instantly again.
add_filter('pre_http_request', function ($pre, $args, $url) {
// If the request is going to layered.market, block it
if (strpos($url, 'layered.market') !== false) {
// Returning a WP_Error makes WordPress treat the request as failed
return new WP_Error(
'layered_market_blocked',
'Blocked slow request to layered.market'
);
}
// For all other URLs, do nothing
return $pre;
}, 10, 3);This snippet basically blocks the plugin from attempting the API call.
I hope that helps.
Thank you, that got me 90% of the way. I did have to change to post_parent as it’s a page.
Here’s my final working code with the changed meta box div ID too./**
* Plugin Name: Hide Fields if not Industries
*/
add_action(
'admin_head',
function () {
// Only run on post.php edit screen.
if (
! isset( $_GET['post'], $_GET['action'] )
|| 'edit' !== $_GET['action']
) {
return;
}
$post_id = (int) $_GET['post'];
$post = get_post( $post_id );
if ( ! $post || 'page' !== $post->post_type ) {
return;
}
// Get parent post.
if ( ! $post->post_parent ) {
// No parent, so parent is not "industries" -> hide meta box.
$parent_slug = null;
} else {
$parent = get_post( $post->post_parent );
$parent_slug = $parent ? $parent->post_name : null;
}
// Hide meta box if parent slug is NOT "industries".
if ( 'industries' === $parent_slug ) {
// Parent is "industries", so do nothing, leave visible.
return;
}
?>
<style>
/* Hide the Pods meta box when parent is not "industries" Change #pods-meta-case-studies to whatever your div ID is for your meta box. You can find this by inspecting the edit page screen */
#pods-meta-case-studies {
display: none;
}
</style>
<?php
}
);You can test this on any WordPress website with ACF.
- Use a file field
- Limit it to mp4
- Use the field on a post and you will see images.
- You can’t add the image to the field which begs the question, why are you even seeing them?
- It should limit the filter to only show/list mp4 files and exclude everything else.
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Sorting IconsI’m an idiot, it was the Post Order plugin.
I’m an idiot, I had the Admin columns plugin overtaking this.
Making as resolved.
Forum: Plugins
In reply to: [Pressidium Cookie Consent] How to change text?Ah, perfect, I hadn’t thought to check that one. That solved it.
Forum: Plugins
In reply to: [New User Approve] Plugin IssuesAh, after you replied, I deleted the plugin and reinstalled and then realised there was a PHP snippet
function custom_user_approval($event) {
$transaction = $event->get_data();
// Get the user object
$user = new WP_User($transaction->user_id);
// Check user roles
if (in_array('local_authority', $user->roles)) {
// If user role is Local Authority, set status to pending
//update_user_meta($transaction->user_id, 'pw_user_status', 'pending');
} elseif (in_array('landowner', $user->roles) || in_array('developer', $user->roles)) {
// If user role is Landowner or Developer, set status to approved
update_user_meta($transaction->user_id, 'pw_user_status', 'approved');
do_action( 'new_user_approve_user_approved', $user );
}
}
// Hook into the 'user_register' action
add_action('mepr-event-transaction-completed', 'custom_user_approval');This was causing it for the end users signing up through my form which gave them the user status of “landowner”.
I will test the email sending again but it might be clearer if this just shows the email address from the general settings rather than [email protected]Forum: Plugins
In reply to: [New User Approve] Plugin IssuesHere’s a link to the diagnostics info
https://netgaincambspboro.org.uk/wp-content/uploads/2025/09/nua-diagnostic-info.txt
Forum: Plugins
In reply to: [New User Approve] Plugin IssuesHere’s a screen cast demonstrating the issues.