I have created 3 certificates and now I want to attach a specific certificate to all courses at once, Like I have 500+ courses, I want the 1st certificate to attach automatically to all courses, And as in our previous chat on Facebook you said "Possible only by a direct query". So provide me the query and a little bit of information how to use this query.
I want to add a link text after the search bar and before the cart icon here https://prnt.sc/v3jyjv
NOTE: I renewed my support to urgently fix this problem, So kindly please make sure to complete my request in your first reply. I'll be very thankful to you.
Thanks
get the certificate post ID, from WP admin - LMS - Certificate Tempaltes, lets say it is "XX"
add_Action('init',function(){
global $wpdb;
$results = $wpdb->get_results("SELECT ID from {$wpdb->posts} WHERE post_type = 'course');
if(!empty($results)){
foreach($results as $result){
update_post_meta($result->ID,'vibe_certificate_template',xx);
}
}
});
The above solution for certificate didn't work https://prnt.sc/v5fkq6
When I add this code in wplms-customizer.php, the site goes down and through an error of https://prnt.sc/v5fm7l , i also changed 'xx' with certificate id
And after deleting this code i checked the course again and no certificate was assigned. https://prnt.sc/v5fn7j
OR i'm doing something wrong? Please let me know,
Thanks
add_Action('init',function(){
global $wpdb;
$results = $wpdb->get_results("SELECT ID from {$wpdb->posts} WHERE post_type = 'course'");
if(!empty($results)){
foreach($results as $result){
update_post_meta($result->ID,'vibe_certificate_template',229);
}
}
});
Author
Posts
Viewing 5 posts - 1 through 5 (of 5 total)
The topic ‘Certificate problem’ is closed to new replies.