• Resolved Ratatuj

    (@ratatuj)


    Hi, Asgaros,

    could you, please, provide a snippet to remove a notification for guest users, I mean this one:

    You need to login in order to create posts and topics. ? Login

    I have my own code, that leads to non-default WP login page which is shown to guests.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Asgaros

    (@asgaros)

    Hello ratatuj,

    when you changed your login-page manually please ensure to use the login_url WordPress filter to override it. After it the correct URL should be used when clicking the link. Here you can find more information:

    https://codex.www.ads-software.com/Plugin_API/Filter_Reference/login_url

    Thread Starter Ratatuj

    (@ratatuj)

    Ehm.. I just added my links to the custom pages, that’s why I just don’t want to show forum’s notification at all, want to hide it. I’m using a 2 language site, so I need my links for different pages.

    Plugin Author Asgaros

    (@asgaros)

    Hello again,

    I added a filter to the forum so you can modify the loginMessage by your own via your themes functions.php, for example:

    function custom_login_message($message) {
    	return '';
    }
    add_filter('asgarosforum_filter_login_message', 'custom_login_message');

    You can find the changeset here:
    https://github.com/Asgaros/asgaros-forum/commit/acb6ce75e45cc3f0ea91bee73efd82bafc248654

    The patch will be available in the upcoming v1.2.2 release (in the next 24 hours).

    Thread Starter Ratatuj

    (@ratatuj)

    Nice, I’ll wait for the patch )

    Thread Starter Ratatuj

    (@ratatuj)

    I just realize that I’m too nooby to understand how to actually use it )))

    I’ve updated the plugin. Could you, please, tell me, what should I actually do (which code to use), if I have, for example, site/ru/login1 and site/en/login pages?

    Plugin Author Asgaros

    (@asgaros)

    Just add this code to your themes functions.php-file and save it. Now the generated login-message should be gone.

    Thread Starter Ratatuj

    (@ratatuj)

    Ah, exactly, very easy. Works well for me. Thanks a lot for you support!

    My theme’s functions.php does not allow me to add any customizations. It says to create a separate plugin for customized codes.

    So where and in which file I can insert the code given by you?

    Or, is it possible just to remove completely the message (“You need to login in order to create posts and topics. ? Login”) appearing on top of the forum?

    Please help, I am a newbeeeee!

    Thread Starter Ratatuj

    (@ratatuj)

    Hi there!

    I am using https://www.ads-software.com/plugins/code-snippets/ It allows to easily manage multiple snippets.

    You create a new one with a code, that posted in this topic, like this, for example:

    https://prntscr.com/cj15ue

    • This reply was modified 8 years, 2 months ago by Ratatuj.

    You are great, Ratatuj.

    You saved me from an annoying message in this good Asgaros plugin.

    Thaaaaaaaaaaaaaaank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove Login notification’ is closed to new replies.