Forum Replies Created
-
AuthorPosts
-
Xavier
ParticipantBy 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.
Xavier
ParticipantHi 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.
Xavier
ParticipantHi 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; } );
Xavier
ParticipantHi 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.
Xavier
ParticipantThe error seemps to be in the fourth line:
$args[‘meta_query’] => array(
Xavier
ParticipantHi 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)
Xavier
ParticipantHi 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);
July 15, 2021 at 7:21 am in reply to: Show related posts create with Advanced Custom Fields in card #32059Xavier
Participant¡Solved!
July 15, 2021 at 12:45 am in reply to: Show related posts create with Advanced Custom Fields in card #32010Xavier
ParticipantHi 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).
How I should modify the first code to achieve this result?
Thanks!
-
AuthorPosts