[Resolved] Change text with css?

Home Forums Support [Resolved] Change text with css?

Home Forums Support Change text with css?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1592978
    chris

    Hi,

    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.

    #1593030
    David
    Staff
    Customer Support

    Hi there,

    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;
    } );

    This function can be a bit hit and miss..

    #1593057
    chris

    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.

    #1593092
    David
    Staff
    Customer Support

    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;
    }
    #1595461
    chris

    Awesome thank you David!

    #1595493
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.