On my listing page, if a user isnt logged in they see a red error box saying they dont have permission to create listings, however i wish to edit that text to ” Only logged in users have access to submit listings” if i could find file in FPT to edit i would but had no luck, so was wondering if i can do the same with css perhaps or a function to the functions.php perhaps? Thanks.
you will need to ask the plugin developers if there is a filter to change the error alert.
If not then you can use a PHP snippet like this that uses the WP gettext function:
add_filter( 'gettext', function( $text ) {
if ( 'Unfortunately you don't have permission to create or edit listings.' === $text ) {
$text = 'Only logged in users have access to submit listings';
}
return $text;
} );
Didn’t seem to work, i have reached out for the filter, although listdom will most likely want to charge me £80 for the code as a “Custom development” haha! jokers.
Well if it comes to that – you can use this CSS Hack – prefer not to do this but it works:
/* Hide current text */
.lsd-alert.lsd-error {
font-size: 0;
}
/* Display new text */
.lsd-alert.lsd-error:before {
content: 'my new message';
font-size: 16px;
}