S2member Pro announcement

Is there an announcement shortcode available in s2member Pro? something that displays a message when a user first logs in (that can be closed by clicking the X in the top right corner)?

No. You can have one time offers, but of course they only show once, and they involve a redirection not a box.

ok, well that is interesting then because I have a box appearing for new users. There is no one time offer used in our settings. Can I PM/email you an account and you take a look please?we cannot even find the source of the text appearing - it is from 2012… Thanks for the reply Tim.

Sorry, but I don’t do that sort of work. Right-click on the box, select Inspect Element, and see what the HTML says. The tag or class name should give you a clue as to where this is coming from.

This is the html - I still cannot tell where this file is located or what it is called…

Do you have a plugin called Sitewide Notice?

no, we don’t have that

no, but it seems to be part of another ( - and there don’t seem to be any settings related to this notice); when I searched the files, I found; /public_html/wp-content/plugins/buddypress/bp-messages/classes/class-bp-messages-sitewide-notices-widget.php which looks like:

<?php /** * BuddyPress Messages Sitewide Notices Widget. * * @package BuddyPress * @subpackage Messages * @since 1.9.0 */ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; /** * A widget that displays sitewide notices. * * @since 1.9.0 */ class BP_Messages_Sitewide_Notices_Widget extends WP_Widget { /** * Constructor method. */ function __construct() { parent::__construct( 'bp_messages_sitewide_notices_widget', __( '(BuddyPress) Sitewide Notices', 'buddypress' ), array( 'classname' => 'widget_bp_core_sitewide_messages buddypress widget', 'description' => __( 'Display Sitewide Notices posted by the site administrator', 'buddypress' ), 'customize_selective_refresh' => true, ) ); } /** * Render the widget. * * @see WP_Widget::widget() for a description of parameters. * * @param array $args See {@WP_Widget::widget()}. * @param array $instance See {@WP_Widget::widget()}. */ public function widget( $args, $instance ) { if ( ! is_user_logged_in() ) { return; } // Don't display the widget if there are no Notices to show. $notices = BP_Messages_Notice::get_active(); if ( empty( $notices ) ) { return; } extract( $args ); $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; /** * Filters the title of the Messages widget. * * @since 1.9.0 * @since 2.3.0 Added 'instance' and 'id_base' to arguments passed to filter. * * @param string $title The widget title. * @param array $instance The settings for the particular instance of the widget. * @param string $id_base Root ID for all widgets of this type. */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); echo $before_widget; echo $before_title . $title . $after_title; ?>
	<div class="bp-site-wide-message">
		<?php bp_message_get_notices(); ?>
	</div>

	<?php

	echo $after_widget;
}

/**
 * Process the saved settings for the widget.
 *
 * @see WP_Widget::update() for a description of parameters and
 *      return values.
 *
 * @param array $new_instance See {@WP_Widget::update()}.
 * @param array $old_instance See {@WP_Widget::update()}.
 * @return array $instance See {@WP_Widget::update()}.
 */
public function update( $new_instance, $old_instance ) {
	$instance = $old_instance;
	$instance['title'] = strip_tags( $new_instance['title'] );
	return $instance;
}

/**
 * Render the settings form for Appearance > Widgets.
 *
 * @see WP_Widget::form() for a description of parameters.
 *
 * @param array $instance See {@WP_Widget::form()}.
 *
 * @return string|null Widget form output.
 */
public function form( $instance ) {
	$instance = wp_parse_args( (array) $instance, array(
		'title' => '',
	) );

	$title = strip_tags( $instance['title'] ); ?>

	<p>
		<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'buddypress' ); ?></label>
		<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
	</p>

	<?php
}

}

You need to talk to the dev for that widget.

Someone on the buddyboss finally solved it… When logged in as Admin, I went to Profile>>Messages>>All Member Notices and it was there – Deactivated it… simple… as I thought it must of been…

Thanks for your help Tim !

1 Like