Forum Replies Created
-
AuthorPosts
-
J
ParticipantHi 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
J
ParticipantSorry, 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
J
ParticipantHi,
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
J
ParticipantI now use Automptimize. Works! No longer html validation errors.
Thanks for the tip.
J
ParticipantHi 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
J
ParticipantThanks for sharing. Will give it a try.
J
J
ParticipantHappy to help you with Dutch translations. What is an ‘editor’?
J
ParticipantI added a Dutch translation.
J
ParticipantDone!
J
ParticipantThanks! Works!
J
J
ParticipantCool! 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
J
ParticipantThanks. Would be great to have it.
-
AuthorPosts