PinkishHue
Forum Replies Created
-
Should I instead be creating a custom merge tag that contains an array of email addresses?
Tried this but the array was empty, clearly I’m not quite grasping this…
function merge_tags() { $this->add_merge_tag( new \BracketSpace\Notification\Defaults\MergeTag\EmailTag( array( 'slug' => 'users_newsletter_optin', 'name' => __( 'Users Newsletter Opt-in'), 'resolver' => function( $trigger ) { $args = array( 'meta_key' => 'dwd_newsletter_optin', 'meta_value' => 'yes', ); $author = get_users($args); return $author->user_email; }, ) ) ); }
Thinking it may have been a conflict with ‘Admin Select Box To Select2’
https://www.ads-software.com/plugins/admin-select-box-to-select2/(This definitely conflicts with the trigger select box on the ‘Add New Notification’ page)
Aah well I had the issue that my custom post type was not appearing in the list of available in Notifications > Settings > Triggers > Post > Post Types > Add you custom post type
Today I have deactivated all my plugins then reactivated Notification, then activated my custom post type and now it appears and I can select it in the list of triggers. There must have been something funky going on somewhere. Hope this helps for anyone else experiencing this issue.
Ok I realised my mistake! It’s right there in the Fields Manager popup at the top.
Marking resolved
??
Same (although I created the post type manually)
Thank you Mushrit, I thought that might be a way to do it, then have those fields update the user meta.
I will try that or create a separate register form (outside of WPUF) that captures the fields I need before the user creates a post.
Thank you for your speedy replies ??
- This reply was modified 3 years, 12 months ago by PinkishHue.
Thank you Mushrit, I am using this in my test environment but was hoping there was a way to alter the username automatically at the time of registration.
Have you ticked ‘yes’ to show data in post from the advanced options on the field?
See image – https://imgur.com/E1mS2en
Alternatively I think you can do this with a regular wordpress filter, see:
https://wordpress.stackexchange.com/questions/102421/adding-a-custom-field-into-the-content
function wpa_content_filter( $content ) { global $post; if( $meta = get_post_meta( $post->ID, 'reviewGrade', true ) ) { return $content . $meta; } return $content; } add_filter( 'the_content', 'wpa_content_filter', 10 );
Just off the top of my head –
you could use WordPress’ built in comment forms but have them work with WPUF by listing a users comments in their dashboard.
Here is some info on listing comments by user –
And this page tells you how to add a section to the WPUF dashboard –
https://wedevs.com/docs/wp-user-frontend-pro/developer-docs/add-a-new-tab-on-my-account-page/
Hope that helps ??
Ok, found this in wp-user-frontend\includesclass-frontend-render-form.php
public function guess_username( $email ) { // username from email address $username = sanitize_user( substr( $email, 0, strpos( $email, '@' ) ) ); if ( !username_exists( $username ) ) { return $username; } // try to add some random number in username // and may be we got our username $username .= rand( 1, 199 ); if ( !username_exists( $username ) ) { return $username; } }
Is it possible for me to add a filter to this function to change the generated username? Or a better way?
Thank you for any suggestions
Forum: Plugins
In reply to: [Admin Select Box To Select2] To use on front endI was looking for exactly this and wondered if that would work. Thanks for posting ??
- This reply was modified 4 years ago by PinkishHue.
- This reply was modified 4 years ago by PinkishHue.
I’ve just realised what is causing this! My browser was set to 90% zoom, when I set it back to actual size the fields appeared again.
Wish I had thought of that before installing 4 or 5 fresh copies of WP!
Anyway, hope that helps anyone else who sees this issue.
Forum: Themes and Templates
In reply to: [Storefront] Simple modification of archive page for CPTForum: Themes and Templates
In reply to: [Storefront] I want to fix this myself – how to?You could try using
.woocommerce-pagination { float: none; clear: both; text-align: center; }
(Untested but those are the sorts of things you want to look for)
As a workaround I decided to create a custom taxonomy and use that to store and display this information instead of using the checkbox field. (Hopefully that’s helpful to anyone else stuck on this.)
Would still be interested in knowing the answer to the above question if possible though, in case of other requirements.
Thanks
- This reply was modified 4 years, 10 months ago by PinkishHue.