Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Adevy

    (@adevy)

    Thank 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 query
    Thread Starter Adevy

    (@adevy)

    I 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 query
    Thread Starter Adevy

    (@adevy)

    Thank 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 ?

    Thread Starter Adevy

    (@adevy)

    Thank you very much !

    I will test.

    Thread Starter Adevy

    (@adevy)

    Thank 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.

    Thread Starter Adevy

    (@adevy)

    Thank 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.

    Thread Starter Adevy

    (@adevy)

    Thank 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.

    Thread Starter Adevy

    (@adevy)

    Thank you for your answer
    I Will try with something else.

Viewing 8 replies - 1 through 8 (of 8 total)