Change email address from Wordpress sites [closed] - wordpress

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a Wordpress site with front end login, it has the password recovery link which works fine.
The problem I have is that the password reset email that the user gets is saying it's from:
WordPress <wordpress#domain.com>
Is there a way I can change this? Possibly remove the word wordpress and/or change the actual email address it's from?

You can this data in the wp-admin panel, General tab. Change the email adress and the domain name.
It should works.
If it's not working, consider using the Send From plugin or add some filter to 'wp_mail_from' like
function use_my_email(){
return 'email#domain.com';
}
add_filter( 'wp_mail_from', 'just_use_my_email' );
and 'wp_mail_from_name'
function use_my_name(){
return 'My Real Name';
}
add_filter( 'wp_mail_from_name', 'just_use_my_email_name' );

Related

Wordpress | get_user_meta in child themes php file [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to get the user meta in a file calles "print.php" in my child-theme folder:
define( 'WP_USE_THEMES', true );
$userid = $_GET['id'];
//$all_meta = get_user_meta( $userid );
When I call "get_user_meta()" i get an Error 500.
I already tried with
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
and
define('WP_USE_THEMES', false);
require('./wp-load.php');
What am I doing wrong and how can I resolve it?
Also tried already to put a function in my functions.php and call this function. No luck.
I hope you can help me.
Thanks and best regards,
Niko
You must include the wp_head() Function on top of your index.php / function.php. So that you can use WordPress Funktions. See the documentation here
https://developer.wordpress.org/reference/functions/wp_head/

How do I add extra fields in Dokan? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
Good Day.
I am developing a multivendor website for my client and I used Dokan. My client would like his vendors to add a (Sample Product Price) and (Bulk Product Price).
Is there any way to add those fields?
He also would like his vendors to add custom tags to their products.
Regards,
Go to dokan plugin directory. then go to the below path
1) templates/products/new-product-single.php
2) templates/products/new-product.php
You can override the new-product.php and new-product-single.php file in your child theme and then add your field. However, there are some other steps required to successfully save them.
These below hooks to save and update the field data.
do_action( 'dokan_new_product_added', $product_id, $post_data );
do_action( 'dokan_product_updated', $post_id );

Wordpress post date hook [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I still can't get my head around hooks but I assume a hook might do what I need.
Currently using WP Show Posts to short code into a home page, that uses WPBakery as the page builder.
WP Show Posts can pull in post header, date, excerpt and button link.
I want to hook the date (post publish date) to the post Advanced Custom Field i.e. event date. this is the development site https://dev.itassetalliance.com/
Webinars category post. changing default wordpress the_date() to
Yes you should be able to use get_the_date filter, more here. Below is a quick example of how you might do this:
<?php
// hook into get_the_date filter
add_filter('get_the_date', function ($post_date) {
// get event date
$event_date = get_field('event_date');
// may need to use some other check here
// but this if we have $event_date return
// it in place of the default post date
if ($event_date) {
return $event_date;
}
// if we did not return an event date
// then return the default date
return $post_date;
});
?>

How to set new user to a group automatically according to their role in Wordpress [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
In my wp website I'm using WP User Group plugin (see plugin page here) so that in the user admin page they are organized in three groups: teacher, student and user. The plugin works very well manually but I'd like it to work automatically.
When a user signs up and he's assigned a teacher role, he should be automatically added to the teacher group.
Any code idea?
WP User Group plugin use user-group taxonomy to save the Group. So
you can use wp_set_object_terms to assign user to a group by
user_id.
Use the below code to assign user after registration:
add_action( 'user_register', 'myAssignGroup', 10, 1 );
function myAssignGroup($user_id){
$user = new WP_User($user_id);
foreach ($user->roles as $role) {
//for teacher
if ($role == 'teacher') {
wp_set_object_terms($user_id, 254, 'user-group', FALSE); //by tag_ID
//wp_set_object_terms($user_id, my-first-group, 'user-group', FALSE); //by term slug
}
//for student
else if($role == 'student'){
wp_set_object_terms($user_id, 256, 'user-group', FALSE);
}
}
}
Code goes in function.php file of your active child theme (or theme). Or also in any plugin php files.
The code is tested and fully functional.
To get the tag_ID or term slug please refer to the attached image.
Hope this helps!

How to get rid of post meta on pages but keep it on posts (wordpress) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am using the "Sight" theme by WP Shower to build http://www.dantiesmith-brown.com
I want to get rid of the meta info (author, time/date/etc..) on pages so that the only thing that displays on a PAGE (i.e. everything that is not the "news" tab, which is the blog)
is the name of the page, the line underneath it, and then the body copy underneath that. I would like the post meta stuff to appear on actual posts, but I want it removed from the pages.
How can I do this?
p.s. the WP Shower forum is not very helpful. I posted this same question several days ago and it hasn't even been uploaded to their forum yet..
You have to edit wp-content/thmemes/sight/page.php and remove this part:
by <span class="post-author"><?php the_author(); ?></span> on <span class="post-date"><?php the_time(__('M j, Y')) ?></span> • <span><?php the_time() ?></span>

Resources