Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: Modify Query – Filter CPT by ACF date field #32890
    Xavier
    Participant

    By the way, I have detected another thing strange.

    I have had installed the version 1.2 beta of the plugin. I thougt, may be the problem is the version of the plugin. When I have downgraded to the current version, with the new code, the design broke again.

    in reply to: Modify Query – Filter CPT by ACF date field #32888
    Xavier
    Participant

    Hi Elvin,

    this code seems correct (the design doesn’t break anymore), but it doesn’t do anything. The elements still order by the date of posting instead of the date of the custom field.

    If you want I can create an acces to the website, just tell me where I can sell the user and pass.

    Thanks again.

    in reply to: Modify Query – Filter CPT by ACF date field #32872
    Xavier
    Participant

    Hi Elvin, I paste this code to the code snippets plugin:

    add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
        if ( 393 === $settings['list_id'] ) {
            $args['post_type'] = array('post','page','evento');
            $args['meta_query'] = array(
                array(
                    'key' => 'fecha',
                    'orderby' => 'meta_value_num',
                    'order' => 'DESC',
                )
            );
        }
    
        return $args;
    } );
    in reply to: Modify Query – Filter CPT by ACF date field #32844
    Xavier
    Participant

    Hi Elvin, with this change the code snippet is “fine” and the error solved, but this code breaks the design of the website completely.

    The website doesn’t show the site content of any page, just the header.

    in reply to: Modify Query – Filter CPT by ACF date field #32836
    Xavier
    Participant

    The error seemps to be in the fourth line:

    $args[‘meta_query’] => array(

    in reply to: Modify Query – Filter CPT by ACF date field #32834
    Xavier
    Participant

    Hi Elvin, thanks for your fast response.

    Unfortunately, when I try to use the code as a code snippet I get this error:

    syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW)

    in reply to: Display Meta Without Link #32720
    Xavier
    Participant

    Hi I am trying to remove the links in meta tags and category, but the suggested code doesn’t work. Should I have to edit anything.

    The page have multiple lists.

    The code I am trying to use is this:

    add_filter( 'wpsp_terms_output', function( $output, $settings ) {
        return sprintf( '<span class="wp-show-posts-terms wp-show-posts-meta">%1$s</span>',
            strip_tags( get_the_term_list( get_the_ID(), $settings[ 'taxonomy' ], '', apply_filters( 'wpsp_term_separator', ', ' ) ) )
        );
    } ,15 ,2);
    Xavier
    Participant

    ¡Solved!

    Xavier
    Participant

    Hi Elvin, I show you the result I have achieved in both cases with an image. The result in the content (achieved with the second code) is what we want in the wp show posts (now just shows the ID).

    Example

    How I should modify the first code to achieve this result?

    Thanks!

Viewing 9 posts - 1 through 9 (of 9 total)