{CODICTS} Snippets is now available

MyListing Dashboard Announcements

The {CODICTS} MyListing Dashboard Announcements plugin enables administrators to create and manage announcements that are displayed directly on users’ account dashboards or embedded anywhere on the site via shortcodes. Each announcement can target specific user roles, use rich HTML or Elementor-designed content, and be independently enabled or disabled.

Installation & Activation

Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.

After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.

On activation, the plugin automatically copies its dashboard template file into your child theme. Navigate to the new Announcements menu in the WordPress admin sidebar to create your first announcement.


Key Features

FeatureDescription
Dual Content ModesCreate announcements using a full HTML code editor with syntax highlighting, or select a pre-built Elementor template.
User Role TargetingRestrict announcement visibility to specific WordPress user roles, including a “Guest” option for non-logged-in visitors.
Dashboard IntegrationAutomatically display announcements at the top of the MyListing user account/dashboard page.
Shortcode SupportEmbed any announcement anywhere on the site using a shortcode.
Enable/Disable ToggleQuickly enable or disable individual announcements from the list table without entering the editor.
Full Admin InterfaceComplete management with search, sort, pagination, duplicate, and delete functionality.

How It Works

The plugin provides two ways to display announcements to your users:

Display MethodHow It Works
Dashboard DisplayAnnouncements with “Display on Users Dashboard” enabled are automatically shown at the top of the MyListing user account/dashboard page. No shortcode needed.
Shortcode DisplayEvery announcement generates a unique shortcode that can be placed in any page, post, or widget for manual placement anywhere on the site.

Both methods check whether the announcement is enabled and whether the current user’s role matches the configured target roles before displaying.


Creating Announcements

1. Go to Announcements → Add Announcement in the WordPress admin.

2. Enter a title for your announcement (e.g., “Holiday Sale Banner,” “System Maintenance Notice”).

3. On the Template tab, choose a content type and create your announcement content.

4. On the Settings tab, configure visibility — enable the announcement, select target user roles, and optionally enable dashboard display.

5. Click Save.

After saving, a shortcode is automatically generated and displayed below the title for easy copy-paste embedding.


Content Types — HTML vs Elementor

On the Template tab, choose how the announcement content is authored:

HTML Template Mode

Write raw HTML in a full-featured code editor with syntax highlighting, line numbers, and bracket matching. The HTML is rendered exactly as written on the frontend. You have complete control over markup, styles, and structure.

Example HTML announcement:

<div style="background: #f0f4ff; border-left: 4px solid #2271b1;
     padding: 15px; margin-bottom: 20px; border-radius: 4px;">
    <h3 style="margin: 0 0 8px;">🎉 New Feature Available!</h3>
    <p style="margin: 0;">We've just launched our new booking system.
       <a href="/features">Learn more →</a>
    </p>
</div>

Elementor Template Mode

Select a pre-built Elementor Library template from a dropdown. The selected template is rendered using Elementor’s builder engine with full styling, widgets, and dynamic content support.

Note: Elementor must be installed and activated to use this mode. The selected template must be published (not draft or private).


Settings Tab — Visibility & Targeting

SettingDefaultDescription
Enabled?OffMaster toggle — the announcement is not shown to anyone unless this is checked.
Show for User Roles(none)Select which WordPress user roles can see this announcement. Includes a special “Guest” option for non-logged-in visitors. All registered roles are listed (Administrator, Editor, Subscriber, custom roles, etc.).
Display on Users DashboardOffWhen enabled, the announcement appears at the top of the MyListing user account/dashboard page automatically — no shortcode needed.

Tip: You can target multiple roles simultaneously. For example, check both “Subscriber” and “Guest” to show a promotional announcement to both logged-out visitors and basic subscribers.

Note: Guests (non-logged-in visitors) cannot see dashboard announcements since they don’t have a dashboard. However, they can see announcements placed via shortcode on public pages.


Shortcode Display

Every announcement generates a unique shortcode displayed in the editor and the list table:

[codicts-mylisting-dashboard-announcements id="123"]

Place this shortcode in any page, post, or widget to display the announcement. The shortcode checks whether the announcement is enabled and whether the current user’s role matches before rendering.

The shortcode only requires the announcement to be enabled and role-matched — the “Display on Users Dashboard” setting is not required for shortcode placement to work.


Managing Announcements

The main Announcements admin page displays all announcements in a sortable, searchable table.

ColumnDescription
TitleAnnouncement title (click to edit).
ShortcodeThe generated shortcode in a read-only input for easy copying.
AuthorThe WordPress user who created the announcement.
DateCreation date and time.
StatusAn interactive toggle switch to enable/disable the announcement instantly without entering the editor.

The table supports search by title, sortable columns (Title, Author, Date), bulk delete via checkboxes, and row actions to Edit, Duplicate, or Delete individual announcements. Pagination is configurable via Screen Options.

Inline Status Toggle

Each announcement has a toggle switch in the Status column. Clicking it immediately enables or disables the announcement without reloading the page. Green = enabled (visible to matching users), grey = disabled (hidden from everyone).

Duplicating & Deleting

Duplicate: Creates a copy of the announcement with “_copy” appended to the title. Available from row actions in the list table or the Duplicate button in the editor.

Delete: Permanently removes the announcement. A confirmation dialog appears before deletion. Bulk deletion is available via checkboxes and the Delete bulk action.


Example Setup

1. Activate the plugin with the MyListing theme and a child theme active. The dashboard template is automatically copied.

2. Navigate to Announcements → Add Announcement.

3. Enter the title “Holiday Sale — 20% Off Premium Listings.”

4. On the Template tab, select HTML as the template type and write your announcement HTML — for example, a styled banner with a sale message and a link to the pricing page.

5. On the Settings tab, check Enabled. Under “Show for User Roles,” check Subscriber and Guest. Check Display on Users Dashboard.

6. Click Save.

7. Subscribers now see the sale banner at the top of their dashboard when they log in. To also show it on the homepage, copy the generated shortcode (e.g., [codicts-mylisting-dashboard-announcements id="42"]) and paste it into the homepage content.

8. Create a second announcement titled “Admin Notice — Server Maintenance.” Use HTML mode for a warning-style banner. On the Settings tab, check Enabled, select only Administrator for user roles, and enable Display on Dashboard. Save. Now only admins see the maintenance notice on their dashboard.

9. When the holiday sale ends, go to the Announcements list and click the Status toggle on the sale announcement to disable it instantly — no need to open the editor.


Frequently Asked Questions

Does this require a child theme?

Yes. The plugin copies a template file into the child theme to inject announcements into the MyListing dashboard. Without a child theme, the plugin cannot install its template and will display an error notice.

Is Elementor required?

No. Elementor is only needed if you want to use Elementor templates for announcement content. The HTML content mode works without Elementor.

Can I show different announcements to different users?

Yes. Each announcement can target specific user roles. Create multiple announcements with different role selections to show different content to different user groups.

Can guests (non-logged-in visitors) see announcements?

Yes — via shortcode. Select the “Guest” checkbox in the user roles setting and place the shortcode on a public page. Guests cannot see dashboard announcements since they don’t have a dashboard.

Do I need to use both dashboard display and shortcode?

No. You can use either one, the other, or both. Dashboard display shows announcements automatically at the top of the user dashboard. Shortcodes let you place announcements anywhere on the site manually.

Does the shortcode require “Display on Users Dashboard” to be enabled?

No. When placed manually via shortcode, the announcement only requires being enabled and having matching user roles. The dashboard display setting is separate and only affects automatic dashboard injection.

How do I style announcements?

In HTML mode, include inline CSS or <style> tags directly in the HTML body. In Elementor mode, use Elementor’s built-in design tools. You can also add global CSS to your child theme’s stylesheet.

What order do dashboard announcements appear in?

Dashboard announcements are displayed in descending order by ID — newest announcements appear first.

Does the plugin create any database tables?

No. Announcements are stored as a custom post type with settings saved as post meta. No custom database tables are created.


Troubleshooting

Announcement Not Showing on the Dashboard

CauseSolution
Not enabledOpen the announcement editor and ensure the Enabled checkbox is checked on the Settings tab.
“Display on Users Dashboard” not checkedThe announcement must have Display on Users Dashboard enabled in the Settings tab for dashboard display.
User role not selectedVerify the current user’s role is checked in the Show for User Roles setting.
Template file missingDeactivate and reactivate the plugin to re-copy the dashboard template to the child theme.

Announcement Not Showing via Shortcode

CauseSolution
Not enabledEnsure the announcement’s Enabled checkbox is checked.
No user roles selectedAt least one user role must be selected that matches the viewing user.
Wrong shortcode IDVerify the id parameter in the shortcode matches an existing announcement’s ID.
Empty ID parameterThe shortcode requires an id parameter: [codicts-mylisting-dashboard-announcements id="123"].

Elementor Template Not Rendering

CauseSolution
Elementor not installedInstall and activate Elementor. The Elementor template mode requires Elementor to render content.
Template not publishedThe selected Elementor template must be published (not draft or private). Check the template’s status in Elementor’s template library.
Wrong template type selectedEnsure the content type is set to “Elementor Template” (not “HTML”) on the Template tab.

Status Toggle Not Working in the List Table

CauseSolution
JavaScript errorCheck the browser console (F12 → Console) for errors. Conflicts with other plugins’ scripts can prevent the AJAX toggle from working.
Stale page cacheThe toggle requires a valid security nonce. If the admin page is served from cache with an expired nonce, the toggle will fail. Reload the page.

Template Overwrite Warning

The following template file in your child theme is managed by this plugin and will be overwritten on reactivation:

templates/dashboard/my-account.php

If you’ve customized this file, back up your changes before deactivating/reactivating the plugin.

“MyListing Theme Not Detected” or “Child Theme Not Detected” Error

The MyListing theme and a child theme must both be installed and active. Go to Appearance → Themes to verify.


For further support, visit codicts.com or contact us at support@codicts.com.

CoDicts Co., Ltd. © 2021-2026. All rights reserved