Ross

Forum Replies Created

Viewing 10 posts - 10,161 through 10,170 (of 10,351 total)
  • Ross Moderator in reply to:
    Restrict results to date range
    #1679

    Hey 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
    #1674

    Ah 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
    #1673

    Hey 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
    #1657

    I 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
    #1656

    Hey 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
    #1654

    Hey 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
    #1645

    Hey 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
    #1636

    Hey 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 and index.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
    #1634

    You most welcome! ๐Ÿ™‚

    Ross Moderator in reply to:
    no download link
    #1630
    This reply has been marked as private.
Viewing 10 posts - 10,161 through 10,170 (of 10,351 total)