t739
Forum Replies Created
-
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Change order of images?Greg, I found the solution.
Inside of<?php foreach($images as $tmp_post): ?>I use new array$nimages = array();and save image urls there. Then I reverse them by$reversed = array_reverse($nimages);and echo themforeach ($reversed as $value) {echo "<li><img src='".$value."' alt=''></li>";}
I’m not a programmer so don’t publish the whole my code, I think you can do this better if you want. I just give an idea.As for thumbnails “function adverts_get_main_image( $id )” I just change this line:
foreach(get_children(array('post_parent'=>$id, 'numberposts'=>1)) as $tmp_post) {
to this:
foreach(get_children(array('post_parent'=>$id)) as $tmp_post) {
and now the first uploaded image is showing as a thumbnail.Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Change order of images?Greg, thanks! What this code changes?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Change order of images?Greg Winiarski, I can’t find $images variable in wpadverts/templates/single.php Is it still in this file?
I need this:
1. use by default the first uploaded image as the main image of an ad.
2. arrange images in ad by default in order that they were uploaded.
Can I ask you to create snippet with this features? I can pay for it.Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Arrange the order of the categoriesFind a way to solve this issue: simply add plugin that sorts categories and taxonomies.
Got it!
Thanks for the cool classifieds plugin!Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Arrange the order of the categoriesGreg Winiarski, I have the same question. Is it possible to add additional field for each category with an ID and set it with number when editing?
I mean, category “Cars” would be ID = “1” and “Boats” would be ID = “2”.
Then in frontend order categories by ID instead of NAME.Greg Winiarski, please explain, how to use https://github.com/gwin/wpadverts-snippets/blob/master/custom-slugs/custom-slugs.php ?
What exactly should I do?