Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m having the same problem but on a different theme (Jupiter), see here: https://neu.aes-energietechnik.at/energie/_/karriere/

    I created a new row ID for the job portal, but when I click on the only job, the single page doesn’t get rendered correctly. There’s no top and footer navigation anymore on it.

    I use that ID: jobs
    And that class: jobs sjb-container

    Any suggestsions?

    Thread Starter boeselhack

    (@boeselhack)

    Hi Sumit,

    a friend of mine already found a solution with this hook:

    add_filter( 'posts_clauses', 'dix_custom_query', 510, 2);
    function dix_custom_query($search, $wp_query) {
    	if (strstr($search['orderby'], 'w2dc')) {
    		$search['orderby'] = 'w2dc_levels.sticky DESC, w2dc_levels.featured DESC, RAND()';
    	}
    #debugster ($wp_query->query_vars['ignore_sticky_posts']);
    	return $search;
    }

    maybe this helps somebody sometime…
    thanks for your effort, sumit!

    bye
    markus

    Thread Starter boeselhack

    (@boeselhack)

    Hi Sumit,

    the sticky entries are on top now, but the other results don’t get randomized with your new code.
    Do you have another tip for me?

    Thanks in advance!
    Markus

    Thread Starter boeselhack

    (@boeselhack)

    Hi Sumit,

    thank you very much for the tip!
    It basically works with this filter added to the functions.php:

    // random search results list:
    add_filter('posts_orderby', 'edit_posts_orderby');
    
    function edit_posts_orderby($orderby_statement) {
    	$orderby_statement = "(gdsra.user_votes_total_sum/gdsra.user_votes_count) DESC";
    	return "RAND()";
    }

    Unfortunately it also randomizes the ?sticky entries“ like here:
    https://goo.gl/FA2yzl

    I’ll have to contact the developer of the web directory plugin for that.
    Thank you very much again!

    Thread Starter boeselhack

    (@boeselhack)

    Hi Sumit,

    thanks for your response!
    The web directory plugin uses the basic wordpress search function as far as I know.
    That’s why the random search result list doesn’t work weithin his plugin…
    OK, thanks anyway!

    Bye
    Markus

Viewing 5 replies - 1 through 5 (of 5 total)