• Resolved cityfox

    (@cityfox)


    Hi,

    how can I change the color of the confirmation message in the widget with CSS?

    I took a look at the source code (directly after subscribing when the conformation message is displayed) but there I can only find code for the entry form not for the confirmation message so I cannot see a selector for changing the color with CSS.

    cityfox

    https://www.ads-software.com/plugins/post-notif/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Devon Ostendorf

    (@devonostendorf)

    Hi cityfox,

    If you’d like to change the color of the confirmation message and/or error message, try adding CSS to your theme targeting one or both of the <span>s responsible for the success message and error messages (“id_spnSuccessMsg” and “id_spnErrorMsg”, respectively).

    They are defined in ../post-notif/includes/views/widget.php and set/displayed by the JavaScript in ../post-notif/includes/js/widget.php.

    Thanks,
    Devon

    Thread Starter cityfox

    (@cityfox)

    Hi Devon,

    that works – thank you very much! For other users of this plugin: I put this code into the css file of my child theme:

    span#id_spnSuccessMsg {
     color: red;
     }
    
     span#id_spnErrorMsg {
     color: red;
     }

    cityfox

    Plugin Author Devon Ostendorf

    (@devonostendorf)

    Hi cityfox,

    Great – I’m glad you were able to change the colors to your liking! Thanks for sharing your code, as well.

    Take care,
    Devon

    Thread Starter cityfox

    (@cityfox)

    Hi Devon,

    an additional question concerning the same kind of issue came up:

    How can I set custom color for the messages “Subscription preferences updated page greeting” and “Unsubscribe confirmation page greeting”?

    I took a look at the source but cannot find a specific selector. The sentences are placed between paragraph tags without an ID or a class. It would be great if I can set custom colors. Especially for the “Subscription preferences updated page greeting” because this message could easily be missed when it has the same color as the whole text on the page.

    Best

    cityfox

    Plugin Author Devon Ostendorf

    (@devonostendorf)

    Hi cityfox,

    You could just surround the greeting with a <div> (or a <p> or a <span> , if you prefer), like so (this is ../post-notif/public/views/post-notif-public-display-unsub.php):

    .
    .
    .

    <div id=”id_sub_prefs_greeting”>
    <?php
    echo $unsub_greeting;
    ?>
    </div>

    .
    .
    .

    And then target #id_sub_prefs_greeting in your CSS.

    Hope this helps,
    Devon

    Thread Starter cityfox

    (@cityfox)

    Hi Devon,

    thanks again for the quick and helpful response. I made it work by doing this:

    File
    ../post-notif/public/views/post-notif-public-display-sub-prefs.php

    I surrounded the greeting

    <div id="id_sub_prefs_greeting">
    <?php
    echo $sub_prefs_greeting;
    ?>

    and added this code in my child theme’s css file:

    #id_sub_prefs_greeting {
      color: red;
     }

    File
    ../post-notif/public/views/post-notif-public-display-unsub.php

    I surrounded the greeting:

    <div id="id_unsub_greeting">
    <?php
    echo $unsub_greeting;
    ?>

    and added this code in my child theme’s css file:

    #id_unsub_greeting {
     color: red;
     }

    cityfox

    Plugin Author Devon Ostendorf

    (@devonostendorf)

    Hi cityfox,

    I am pleased to hear that you got things working the way you wanted them to. Thanks for sharing your solution!

    Thanks,
    Devon

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change color for confirmation in widget’ is closed to new replies.