Tunn
Forum Replies Created
-
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add a title to the Category dropdown fieldI solved it by replacing the next code line:
$field["options"] = array("value" => " ", "text" => "Select a category ...", "depth" => 0, "selected" => "selected", "disabled" => "disabled");
with:
$field["empty_option"] = 1; $field["empty_option_text"] = "Select a category ...";
But why the replaced code line doesn’t work?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add a title to the Category dropdown fieldI tried with no success the next (see the options field):
if(!is_admin()) { foreach($form['field'] as $k => $field) { if($field['name'] == 'advert_category') { $field['is_required'] = true; $field["options"] = array( array("value" => " ", "text" => "Select a category ...", "depth" => 0, "selected" => "selected", "disabled" => "disabled")); if( ! isset($field['validator']) || !is_array($field['validator'])) { $field['validator'] = array(); } $field['validator'][] = array( 'name' => 'is_required' ); $form['field'][$k] = $field; break; } } }
- This reply was modified 7 years, 8 months ago by Tunn.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Order of imagesBTW, the ad author CAN choose the featured image by editing any image and selecting the “Use this image as main image” option. Just put the mouse cursor on any image after uploading and click the edit button.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Order of imagesYes, if you have enabled the featured images, the last uploaded image is used as featured. And, if you not disabled the Gallery, this is OK, because, if you have uploaded more then one image, you will not have the same image in two different places, but if you disabled the Gallery, this is not so good, because we logically expect that the first image will become the featured image.
@gwin I don’t know if this kind of support request is directly related to the plugin functioning, but will be great if Greg can help to solve this in a some way.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Custom fields add onThank you, @richardculley!
I see, my CSS works. But, I think, will be better to replace it with this new one:
.adverts-search-form .adverts-form-filters span { text-transform: uppercase; }
Test it.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Custom fields add onTry this:
.adverts-search-form .adverts-button-small span:first-child { text-transform: uppercase; }
BTW, how you added the advanced search?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Make gallery expand for height?Thank you!
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Ads by author snippet strange behaviour@gwin Greg, thanks, after some more thinking, I get the idea: I need a main page for all my ads. But here are some subtleties.
So, if you, the blog owner, want to display ads from separate categories on separate pages, with a shortcode like this –
[adverts_list category=4]
, and you plan to use also the Ads by author snippet, you must previously to create a main page for all your ads with a shortcode[adverts_list]
in the content. You don’t need to add this page to any menu if you don’t want. It is needed only to display the author’s ads from all categories when someone will click the author link. The secret is that this main page must have a lower ID than the pages that will display ads from some particular categories. Of course, this main page can be added to the menu to display all published ads of all authors.Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Make gallery expand for height?@lazyym, can you share here about which snippet are you talking?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Ads by author snippet custom page title?Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Ads by author snippet custom page title?@lazyym What you mean by “… snippet inherits the main page title“? In my case I see as title the name of the category to that my authors strangely are linked (see below).
@gwin I like the idea behind this plugin, but I notice a strangeness: all my authors are linked to a category (the same for all of them; more precisely, they are linked to the page where this category is displayed), the link that displays the author’s post looks like this: https://example.com/category_slug_here?posted_by=1. I display my ads by categories on separate pages with a shortcode like this –
[adverts_list category=6]
. The page for the category that my authors are linked to was the first that I created for categories, so it has the smallest ID number, probably this is why they are linked to it. How this can be solved?- This reply was modified 7 years, 8 months ago by Tunn.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Optional contact form?@lazyym Sorry, I did not understand your question correctly. An option to exclude the contact form in some situations would be great.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] WPAdverts thumbnail supportGreg, thank you!
Your above code added the support for featured images and using only it I can now add a such image to advert posts from the
wp-admin
.By adding the Force Featured Image snippet from https://github.com/simpliko/wpadverts-snippets/blob/master/force-featured-image/force-featured-image.php an image added to the Gallery can be made “main” (featured), but we will see it also in the Gallery, that is not so good. I think the featured image must have an option to be removed temporary from the Gallery.
Anyway, I find these functions helpful and I will use them in some cases, but they don’t helped me to display thumbnails with the main loop/query on the home page as regulars posts are. Probably, I must use a custom template for this.
You can mark this case as solved.
- This reply was modified 7 years, 8 months ago by Tunn.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Optional contact form?You mean that the existing contact form is not enough? You can add some more custom fields. In this way I have added a custom field for tags and an other for new category suggestions.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] WPAdverts thumbnail supportSorry, but the above add_thumbnail_support_for_adverts() function seems not to work.
This is a good one (tested):
add_action('after_setup_theme', 'wptips_custom_init'); function wptips_custom_init() { add_post_type_support( 'advert', array( 'thumbnail', 'post-formats', 'page-attributes', 'comments', 'author' ) ); }
Anyway, the question how to display the ad thumbnails with the main loop remains.
- This reply was modified 7 years, 9 months ago by Tunn.