Adevy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Refresh custom field after publicationThank you for your answer.
I’m sure that $post_id is available because it’s not use one time.This is the function :
function send_mail_publication($post_id) { $options = get_post_meta($post_id, '_ait-dir-item', true); $emailemis = $options[emailemission]; if ( $emailemis == 1) { return; } else { if ( empty($options[email]) OR empty( $options[gpsLatitude] ) OR empty( $options[gpsLongitude]) ) { return; } $name = get_the_title($post_id); $email = $options[email]; $profession = $options[prof]; $lien_url = get_permalink($post_id); $message = "Dear" . $name . "..."; $check_mail = wp_mail( "gab.davy@gmail.com", $message); if(1) { $val = get_post_meta($post_id, '_ait-dir-item', true); $val[emailemission] = '1'; $updat = update_post_meta($post_id, '_ait-dir-item', $val); wp_mail( "test@gmail.com", "emailemission okk"); } } } add_action('publish_ait-dir-item', 'send_mail_publication');Thank you
Forum: Plugins
In reply to: display a sql queryI have already created the custom post type (called book) and custom fields (Mark for price, quality,…), thanks to you. But I don’t know visitor’s answers can change automatically the custom fields of the good book.
For example, I want to mark the book number 14, with a 6/10 for price and a 9/10 for quality. Is there a plug in to change the average? (If I have to write the formula, it’s better).
I have downloaded ninja forms to collect answers.In a second step, I didn’t find any plug in wich can display automatically all of the custom post type. (Of course, I don’t want to add every book one by one.
After I will use taxonomy to filter.Thank you again!!
Forum: Plugins
In reply to: display a sql queryThank you very much for your answer.
I understand what you say but I don’t understand how i Can, fisrtly, display a table in order to show results of the database ?
Even if visitors can’t touch the sql database, how can them see it ?
Forum: Plugins
In reply to: Link phpmyadmin and dashboardThank you very much !
I will test.
Forum: Plugins
In reply to: Link phpmyadmin and dashboardThank you. Actually my aim is very simple.
I want to list a lot of book.
Every book must have a title, a description, a category (tragedy, comedy,…). And I want that people can mark a book with several mark.
In a page of my website I will show a ranking for the best book.To do this, I have created a custom post type called BOOK, with a TITLE and an EXCERPT. With a plugin, I have added some custom fields, category, average mark, and several marks.
Now, can I change the value of this mark directly with the answers of internet users ?
It’s my first site with wordpress and I think my problem is that I reflect with database because with a table in PHPMyAdmin it’s simple but I want to do this with wordpress.
Forum: Plugins
In reply to: Link phpmyadmin and dashboardThank you, it’s exactly what’s I needed !!
I hope it’s the last question : Is it possible to create a Custom Post Type (called Product) with a name (with Title), a little description (with Excerpt), a mark for value for money (1 to 5), a mark for quality and a general mark ?
Do I have to use taxonomy ?Idealy, I want to people change automatically the mark after the vote.
Forum: Plugins
In reply to: Link phpmyadmin and dashboardThank you very very much.
But i dont understand how to use the data in new tables in my website.
I want use the datas in the new table.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Link Tablepress and PollThank you for your answer
I Will try with something else.