nativebreed
Forum Replies Created
-
Issue resolved. The issue was that my function was returning a string instead of an array.
Below is the final working code for anyone that needs it.
BTW, I also added, in the final version, an option to set notification_id to apply the routing to – I don’t think this is not necessary – but ….
define( 'MYFC_FORM_ID', 1 ); define( 'MYFC_SELECT_FIELD_ID',3 ); define( 'MYFC_DEFAULT_NOTI_EMAIL', 'c@test.com' ); // Optional: set to an integer to restrict email routing to one specific notification. Leave undefined (or set to 0) to apply routing to ALL notifications on the form. define( 'MYFC_NOTIFICATION_ID', 1 ); function myfc_get_email_routes() { return array( 'Text A' => 'a@test.com', 'Text B' => 'b@test.com', ); } add_filter( 'wpforms_entry_email_atts', 'myfc_dynamic_email_routing', 10, 5 ); function myfc_dynamic_email_routing( $email, $fields, $entry, $form_data, $notification_id ) { if ( (int) $form_data['id'] !== MYFC_FORM_ID ) { return $email; } if ( defined( 'MYFC_NOTIFICATION_ID' ) && (int) MYFC_NOTIFICATION_ID !== 0 ) { if ( (int) $notification_id !== (int) MYFC_NOTIFICATION_ID ) { return $email; } } $selected = isset( $fields[ MYFC_SELECT_FIELD_ID ]['value'] ) ? trim( $fields[ MYFC_SELECT_FIELD_ID ]['value'] ) : ''; $routes = myfc_get_email_routes(); $routed_email = MYFC_DEFAULT_NOTI_EMAIL; if ( isset( $routes[ $selected ] ) ) { $routed_email = $routes[ $selected ]; } $email['address'] = array( $routed_email ); return $email; }Forum: Plugins
In reply to: [Microposts - Microblogging post type] Messes with search results :)No response from original poster. Please, mark this as resolved.
The hashtags (#tags) are actually being retrieved along with the post data, but they are not visible because they have been intentionally hidden using CSS. Specifically, the container that holds the tags has its display property set to none in the stylesheet located at pluginfolder/assets/mp-style.css, which prevents it from appearing on the page.
To make the hashtags visible, you can override this rule in your template’s CSS by adding the following declaration:
.mp-tags {
display: block !important;
}This forces the tag container to render, overriding the original setting. With the #tags now visible, your blog visitors would be able to click on the #tags to display a filtered list of microposts with that tag.
I hope the above helps.
Forum: Plugins
In reply to: [Microposts - Microblogging post type] Messes with search results :)Hi
The Micropost plugin shouldn’t affect the built-in search function. Please could you share your website URL?
Thanks.
Forum: Plugins
In reply to: [Microposts - Microblogging post type] Single Micropost “Not Found”Hi guys.
Try: Go to Settings -> Permalinks -> Click “Save Changes” button.
Try also: Go to Settings -> Microposts -> Set Single Micropost Template to “Use theme’s template” -> Click “Save Changes” button.
Hi guys.
See how the “Share on Mastodon” plugin works because it works well with Micropost.
Hi.
I have updated the plugin and add a new feature you might like. A shortcode [creomicro_list] with date and tags filtering, sorting, and customisable no result message.
Examples:
[creomicro_list start=”2025-11-01″ end=”2025-11-30″]
[creomicro_list tag=”news,updates” sort=”asc”]
[creomicro_list no_message=”No posts found.” per_page=”3″]
[creomicro_list start=”2025-11-01″ end=”2025-11-30″ tag=”geopolitical,woke” sort=”asc”]It sounds like the enhancements you’re planning might already be possible with WordPress’ existing features. A micropost is simply another post type – just like pages or standard posts. You may want to explore WordPress user roles (https://wordpress.com/support/invite-people/user-roles/) for more control. The Microposts plugin also supports built-in threaded comments and replies.
I am afraid this is not possible with the current version of the plugin-in and I have currently no plans to add this feature.