Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    When the plugin is activated, the content for all posts is stored in plugin table (“wp_mltlngg_translate”). You can get the current language using $mltlngg_current_language variable.

    global $mltlngg_current_language;
    $post_id = 1;
    $post_data = $wpdb->get_row( “SELECT * FROM wp_mltlngg_translate WHERE post_ID = {$post_id} AND language = ‘{$mltlngg_current_language}'”, OBJECT );
    var_dump( $post_data->post_title, $post_data->post_content, $post_data->post_excerpt );

    Sincerely,
    BestWebSoft Support Team

    Thread Starter pankaj.9094

    (@pankaj9094)

    Thank you, It’s working.

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    We are glad that everything is fine now. Feel free to contact our support team with any questions in future.

    Have a nice day!

    Sincerely,
    BestWebSoft Support Team

    Hi,
    I want to do ajax loading posts. But produces an error. How to realize this?
    Did as you said but again gives an error
    (
    $mltlngg_current_language variable.

    global $mltlngg_current_language;
    $post_id = 1;
    $post_data = $wpdb->get_row( “SELECT * FROM wp_mltlngg_translate WHERE post_ID = {$post_id} AND language = ‘{$mltlngg_current_language}’”, OBJECT );
    var_dump( $post_data->post_title, $post_data->post_content, $post_data->post_excerpt );

    )

    Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using get_post find selected language content’ is closed to new replies.