Hi,
in the list view you can show the FEATURED word after the title by adding the code below in the wp-admin / Appearance / Customize / Additional CSS panel
.wpa-list-view .wpa-result-item.advert-is-featured .wpa-result-link::after {
content: '- FEATURED';
}
Is it possible to have it directly above the image?
Hello,
You can try this. It will put an image on the top left of the ad image.
You can put it the function.php file or just make a plugin
// Feature List Title
add_action( “adverts_list_after_title”, function( $post_id ) {
$post = get_post( $post_id );
if( $post->menu_order < 1 ) {
return;
}
echo ‘location of image’;
} );
// Feature Display Page
add_action( “adverts_tpl_single_top”, function( $post_id ) {
$post = get_post( $post_id );
if( $post->menu_order < 1 ) {
return;
}
echo ‘location of image’;
} );
sample image
https://www.screenpresso.com/=wIC4b
Hi,
you can use the snippet by @nmccainjr to do that, but to postition the “FEATURED” flag above the image you will need it to show a HTML code like this
add_action( "adverts_list_after_title", function( $post_id ) {
$post = get_post( $post_id );
if( $post->menu_order < 1 ) {
return;
}
echo '<span style="position:absolute; top: 5px; right: 5px; background: silver; ">FEATURED</span>';
} );
Note that this will display in both Grid and List modes.
Thank you @gwin and @nmccainjr !