Dmitry
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Classifieds & Directory Pro] Include Title in SearchResolved. Relevanssi plugin was causing the issue.
Thank you. Yes please, a solution in code would be greatly appreciated. Perhaps code for a snippet (using Code Snippets plugin) using add_filter or similar?
Forum: Plugins
In reply to: [Reviews Plus] Error in Reviews Headings Links in Adminone example would be the trash link when looking at the list of reviews
Forum: Plugins
In reply to: [Reviews Plus] Error in Reviews Headings Links in Adminthe page that lists the reviews
Forum: Plugins
In reply to: [Advanced Classifieds & Directory Pro] Auto User RegistrationThank you!
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Featured image for each advertFor some reason the code snippet is not working for me. I tried it as a plugin and using Code Snippets – neither seems to work…
add_filter( "adverts_action_preview", "force_featured_image_add" ); add_filter( "adverts_template_load", "force_featured_image_edit" ); /** * Forces featured image when adding new Ad using [adverts_add]. * * @uses force_featured_image() * * @param string $content Page content * @return string */ function force_featured_image_add( $content ) { $post_id = adverts_request("_post_id", null); force_featured_image( $post_id ); return $content; } /** * Forces featured image when editing and Ad in [adverts_manage]. * * @uses force_featured_image() * * @param string $path Path to template file * @return string */ function force_featured_image_edit( $path ) { if( basename( $path ) == 'manage-edit.php' && isset( $_POST['_post_id'] ) && is_numeric( $_POST['_post_id' ] ) ) { force_featured_image( $_POST['_post_id'] ); } return $path; } /** * Sets featured image for $post_id * * @param int $post_id ID of a post for which we wish to force featured image * @return int 1 if success less or equal to 0 on failure */ function force_featured_image( $post_id ) { if( $post_id < 1 ) { // No images uploaded return -1; } else if( $post_id > 0 && get_post_thumbnail_id( $post_id ) ) { // Has main image selected return -2; } $children = get_children( array( 'post_parent' => $post_id ) ); foreach( $children as $child ) { update_post_meta( $post_id, '_thumbnail_id', $child->ID ); return 1; } return 0; }
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Send Message Form Default SubjectWorks perfectly! Thank you.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Send Message Form Default Subject…is there a similar way to remove the Subject field from the contact form as it’s now not needed?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Send Message Form Default SubjectAwesome! Thank you. I have included it using the Code Snippets plugin which I use for stuff like this. Worked perfectly. Now I can tweak it as much as I like.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Users unable to delete ad imagesThank you, that worked – I added it to the add.php template.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Users unable to delete ad imagesThank you. You can create a test account and ad if you need to as I’m still not displaying the listings publicly yet. https://www.carsapproved.com.au/add/