Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter furansco

    (@furansco)

    Hello again.
    Not really in the need of a special plugin o anything, I’m really just looking for a function or at least a code that could help me.
    Well, I actually got it by doing some research.

    $start = $page * 10;
    
            $args = array(
                'post_type'=> 'wpcf7_contact_form',
                'order'    => 'ASC',
                'posts_per_page' => 10,
                'offset' => $start
            );
    
            $the_query = new WP_Query( $args );
            global $wpdb;
            $cfdb = apply_filters( 'cfdb7_database', $wpdb );
            $table_name = $cfdb->prefix.'db7_forms';
            $form_post_id = 0; //Table ID
            $results = $cfdb->get_results( "SELECT form_value FROM $table_name 
            WHERE form_post_id = $form_post_id ORDER BY form_id DESC LIMIT 100", OBJECT );
    
            foreach ($results as $rowID => $row) {
            	$values = unserialize($row->form_value);
            	foreach ($values as $field => $value) {
            		$html .= $field.' : '.$value.'<br>';
            	}
            	$html.= '<hr>';
            }
            echo $html;

    You can help other people by wrapping this into a function.
    Thanks again for your support and for bringing this useful plugin.

    Thread Starter furansco

    (@furansco)

    I solved this. The issue was a hardcoded shortcode with the start location set to Dublin… which I noticed thanks to your suggestion.
    Now the map respects the start location specified in the settings.
    Thank you!

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