Hi,
to replace the date with location you would need to open a file wpadverts/templates/list-item.php and replace
<?php echo date_i18n( get_option( 'date_format' ), get_post_time( 'U', false, get_the_ID() ) ) ?>
with
<?php echo esc_html( get_post_meta( get_the_ID(), "adverts_location", true ) ) ?>
That being said the Location should on the [adverts_list] by default, however you are most likely using it in grid mode where the location is hidden and the date is shown, you can change that by adding the code below in wp-admin / Appearance / Customize / Additional CSS panel
.advert-item-col-2 span.advert-date,
.advert-item-col-3 span.advert-date,
.advert-item-col-4 span.advert-date {
display: none;
}
.advert-item-col-2 .advert-location.adverts-icon-location,
.advert-item-col-3 .advert-location.adverts-icon-location,
.advert-item-col-4 .advert-location.adverts-icon-location {
display: inline-block;
line-height: 1.8em;
padding: 10px 0 10px 0;
}
With the above CSS code you would not need to change the list-item.php file so the change would not be overwritten on the update.
Thank you very much Greg.
If I make a change to list-item.php and there in an update to the plugin i will loose the change wont i?
Is there any such thing as child plugin like there is child theme? Sorry if this makes anyone laugh… serious question 🙂
Hi,
if you have made the change in list-item.php file then this change will be overwritten on the next WPAdverts update.
To avoid id you can create a child template for list-item.php as explained here https://wpadverts.com/documentation/child-themes-and-templates/
Thanks mate you are awesome.
You know how you made a change to above in css, can the same be done for the foot.
In responsive, you have to click on the link, for the one of the four widgets areas to open up.
In css is there a way also, for them to automatically open up when the page opens. So they can be seen in full and user doesnt have to click on it to open.
Hi,
hmm i am not exactly sure what do you mean? That is where you would like to make this change and what it should do?
The WPAdverts does not really have any footer by default?