• Resolved snippet24

    (@snippet24)


    I’m trying to set it with:

    <?php
    function actividades_shortcode_funcion( $atts ) {
           $args = array (
                'meta_query'             => array(
                  'relation'    => 'AND',
                    array(
                      'category'         => 'actividades',
                        'key'       => 'fecha_de_termino',
                        'value'     => $today,
                        'compare'   => $fecha,
                        'type'      => 'DATE',                    
                    ),
                  ),
                  'lang' => 'es_CL', 
            );
    
    ob_start();
    
       include(locate_template('actividades.php'));
       
       return ob_get_clean();   
    }
    
    add_shortcode( 'actividades_shortcode', 'actividades_shortcode_funcion');
    
    ?>

    But is not working unfortunately…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter snippet24

    (@snippet24)

    Ok, srry it does work just not on sticky posts for some reason…

    • This reply was modified 2 years, 1 month ago by snippet24.
    Thread Starter snippet24

    (@snippet24)

    Seems the issue is with 'ignore_sticky_posts' => 0 not being in effect..

    Thread Starter snippet24

    (@snippet24)

    Thank you for fixing it in the latest update 🙂

    Marking as closed

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

The topic ‘How to set shortcode lang?’ is closed to new replies.