We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Restrict shown posts to >= today #31601
    J
    Participant

    Hi there,

    I found a solution for my question above. In retrospect, I tried to stretch the functionality of WP Show Posts a bit too much. Sorry for that.

    Your earlier answer pointed in the right direction. Instead of adding a filter to WPSP I was able to write a function – inspired by link – able to do the following:

    • Get a list of posts
    • Created by an author
    • Filtered with a value of a custom post field
    • Sorted in the right order

    Thanks for your help!

    J

    in reply to: Restrict shown posts to >= today #31578
    J
    Participant

    Sorry, to be so late. Tried your solution. Unfortunately it failed.

    I keep getting syntax error, unexpected '=>' (T_DOUBLE_ARROW)

    Double checked the code. Tried to split it up, no luck.

    Running: PHP 7.4.1. WPSP: 1.2.0-alpha.3

    add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
        if( 123 === (int)$settings['list_id'] ){
            $user_id = get_current_user_id();
            $args['author'] = $user_id;
            $args['meta_query'] => array(
                array(
                    'key'       => 'acf_field_name',
                    'value'     => date('Ymd'),
                    'type'      => 'date',
                    'compare'   => '<='
                )
            );
        }
        return $args;
    }, 15, 2 );

    My editor highlights the line $args['meta_query'] => array( with the unexpected error.

    Any suggestions? Or alternatives?

    Thank you for your help.

    J

    in reply to: Restrict shown posts to logged in author… #31027
    J
    Participant

    Hi,

    Works!

    add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
        if(123 === (int)$settings['list_id']){
           $user_id = get_current_user_id();
           $args['author'] = $user_id;
         }
         return $args;
    }, 15, 2 );

    Thanks for your help!

    J

    in reply to: How to move inline style to head #21004
    J
    Participant

    I now use Automptimize. Works! No longer html validation errors.

    Thanks for the tip.

    in reply to: How to move inline style to head #19885
    J
    Participant

    Hi there,

    Running into the same html validation error trying to get website that uses WPSP WCAG 2.1 compliant.

    Question 1: How can we move the styles to the footer?

    Question 2: When will the transition to a block-based system be finished?

    WPSP is one of our favorite plugins!

    J

    in reply to: Restrict number of posts on mobile #6907
    J
    Participant

    Thanks for sharing. Will give it a try.

    J

    in reply to: Translation #1845
    J
    Participant

    Happy to help you with Dutch translations. What is an ‘editor’?

    in reply to: Translation #1830
    J
    Participant

    I added a Dutch translation.

    in reply to: Translation #1826
    J
    Participant

    Done!

    in reply to: Title on image #1808
    J
    Participant

    Thanks! Works!

    J

    in reply to: Title on image #1801
    J
    Participant

    Cool! Would be helpful.

    Please have a look at http://test.wieswies.nl/temp/
    – based on images of six posts
    – titles above the images
    – can the post titles be shown on the images with some CSS?

    Thanks for your help

    J

    in reply to: How to show tags? #1786
    J
    Participant

    Thanks. Would be great to have it.

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