Ross
Forum Replies Created
-
Ross Moderator in reply to:
Restrict results to date range(Private) June 18, 2014 at 12:34 pm #1679Hey Philip
Add this code to the bottom your functions.php file in your theme
add_action( 'pre_get_posts', 'filter_post_dates' ); function filter_post_dates($query) { //this function changes the order of your posts by date if ( !is_admin() && $query->is_main_query() ) { $query->set( 'order', 'ASC' ); //a $query->set( 'orderby', 'date' ); add_filter( 'posts_where', 'after_date_filter'); } return $query; } function after_date_filter( $where = '' ) { //here we limit the results to only the posts set in from today onwards: $today = date( 'Y-m-d' ); $where .= " AND post_date >= '$today'"; return $where; remove_filter( 'posts_where', 'after_date_filter'); }
There is one thing though, I think that posts published in the future (ie with post date) are not considered
published
by wordpress so they not display.. but I guess you already know that… In this case you may have to use the custom field, which means the code above will need to be different (let me know and I’ll look)…Just to note, your results page (once you submit the search form) does not match the layout of your initial search page… let me know if you need help with that I have some recommendations on the best way to set it up.
Thanks
Ross Moderator in reply to:
Translation of "All" terms not working(Private) June 18, 2014 at 10:49 am #1674Ah yeah Pierre my mistake, there was the existence of a class “postform” which should not be there so I will remove this next time.
RE the translation – did you try to check the “string translation” addon in WPML (its part of your purchase)?
The headings in those fields (“all” “taxonomy”) should be able to be added to the string translation of WPML
http://wpml.org/documentation/getting-started-guide/string-translation/
Let me know!
Ross Moderator in reply to:
Categorized results(Private) June 18, 2014 at 10:42 am #1673Hey Neal
This is not possible yet I’m afraid… :/ What will need to happen is a combination of things…
1) I will need to set up the defaults feature I was talking about above…
and
2) You will need to create seperate search forms for each category, and set up the default category to work..!
Whats wrong with the search templates you’ve created?
Ross Moderator in reply to:
Translation of "All" terms not working(Private) June 18, 2014 at 12:47 am #1657I just used firebug to modify the styles on your site, I disabled your
robotoregular
font and everything looked fine ๐ You should try loading roboto from google fonts instead of locally, it would probably be faster to load and I’m hoping you wouldn’t get these errors.PS it looks like you are using an older version of the plugin, if you update to 1.1.6 you will find more classes added to the search form which you may find useful for styling individual fields.
Ross Moderator in reply to:
Translation of "All" terms not working(Private) June 18, 2014 at 12:40 am #1656Hey Pierre
Thanks for this link I will do some more research tomorrow.
RE the encoding problem, when I choose a dropdown, I see what looks like an encoding problem, but when I choose a select option it displays fine. Do you think this might be a font issue? Looking directly at the source code shows the correct text for the options too.
Thanks
Ross Moderator in reply to:
Translation of "All" terms not working(Private) June 17, 2014 at 10:51 pm #1654Hey Pierre
I’ll take a look at this tomorrow – do you have a link I could look at?
Thanks
Ross Moderator in reply to:
Categorized results(Private) June 17, 2014 at 7:08 pm #1645Hey again Neal haha ๐
Do you mean when you click on the “featured listings page” the results that are shown by default? You wish to limit/or constrain the visible posts with a set of “defaults”, ie the possible categories that the search form can search in (just like you can specify the post types)?
Thanks
Ross Moderator in reply to:
Few issues with Dynamix theme(Private) June 17, 2014 at 12:04 pm #1636Hey Emmanuel
It sounds like you need to configure your results template and you should be ok with most of above…
Make sure in the settings that custom template is selected and ticked.
Then underneath you can enter a filename – your results page is determined by this template specifically – so here you can try different templates from you theme such as
search.php
,archive.php
,categeory.php
andindex.php
– there will be more in your theme folder.Re the URL – results will appear on a custom results URL, if you entered a “slug” in the settings, then your results will appear on this URL (I think you chose
resultat
)…And with the categories – this is something I will need to look into – I will do some tests here first and then get back to you.
Thanks
Ross Moderator in reply to:
no download link(Private) June 17, 2014 at 11:07 am #1634You most welcome! ๐
Ross Moderator in reply to:
no download link(Private) June 17, 2014 at 10:36 am #1630This reply has been marked as private. -
AuthorPosts