Is there a way to add an option to “report” an ad? I didn’t see any question about this? Maybe just a button to redirect users to a contact form to report an abusive ad?
I used this topic as reference to add a like option. Used the extension “Post Like Dislike” and added the code below in my theme functions.php:
add_action( "wpadverts/block/details/tpl/end", function( $post_id ) {
echo do_shortcode(sprintf('[posts_like_dislike id="%d"]', $post_id ) );
}, 1000 );
The pluging is actived, and the option “enable posts like and dislike in frontend” is on but still nothing is showing in frontend… ?
]]>On both the advert add page and advert listing page, the location only autocompletes some of the time and I often have to refresh the screen several times to get it to work.
The main problem however comes from searching for an advert on the listing page. When I put in any location (even one that is already showing in the locations list) and when the radius is set for up to 50 miles, I get an error screen coming up which shows “Error 404 – Error Page – What you are looking for is not here”.
I know there are listings there in the search area so not quite sure why I’m getting the error message or why the location autocomplete is only working sporadically. My Google API Key is showing as “ok” when I check it
]]>Do you have an idea how to track (count) the following user-actions on the adverts page:
* number of contact approaches via the form (submits)
* number of clicks on the button with an abbreviated phone number (clicks)
Having a little statistic overview with this data on WordPress-Dashboard would be great, but needs some more efforts.
Tracking this using Google Analytics should be easier? Do you or any other have any idea how this could be realized or do you have a solution for it already?
thanks for your help.
br, Roland
ps: to abbreviate the phone number and show it after a click, the following css-only-solution works (js would be better):
.adverts-button a {
display: inline-block;
line-height: 12px;
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.adverts-button a:hover, .adverts-button a:active {
width: auto;
overflow: initial;
text-overflow: initial;
}
]]>/** Enable the thumbnail support for "advert" post type **/
function add_thumbnail_support_for_adverts() {
add_theme_support( 'post-thumbnails', array( 'advert' ) );
}
add_action( 'after_setup_theme', 'add_thumbnail_support_for_adverts' );
then added the “advert” post type to the main query (main loop) to display ads together with the default WordPress post type on the home page:
/** Add "advert" post type to the main query **/
add_action( 'pre_get_posts', 'add_advert_post_type_to_query' );
function add_advert_post_type_to_query( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( 'post_type', array( 'post', 'advert' ) );
return $query;
}
but ads still are saved without thumbnails in the database (the _thumbnail_id meta_key). Can you suggest how to solve this? I think that the first uploaded image can be set up as a thumbnail.
]]>I was able to do a different sidebar for my single posts by creating single-advert.php, however I would like to do the same for advert-category/category-goes-here. I am currently receiving the default sidebar with list.php in the main content area.
Can someone please help me out with this, I am stumped.
https://www.ads-software.com/plugins/wpadverts/
]]>