Add on the gridfx plugin search another point. (Another like plugin sort)

Hey,

i used on my page a plugin called gridfx . There is a search included for posts. There is a (bad!) like script included.
So i use another like script. At the front page i can choose categories and sorting like A->Z, Most Likes etc.

Problem is the "most likes"-option sorts only the included like script from gridfx and not my kklikeit-plugin.

But i want to have a order who order the most liked posts with kk i like it plugin and not the included script.

In loop.php i found this:

<!--BEGIN FILTERS BAR-->
	<div class=&quot;gridfx-bar&quot;>

		<?php
		if ($taxonomy_filter) {
			global $post;
			$taxonomies = explode(',',$taxonomy_filter);
			foreach($taxonomies as $taxonomy) {

				if ($taxonomy && !$post_parent) {
				if (!$include_terms){
				if ( gridfx_menu_cat_include($include_terms, $include_terms_tree, $taxonomy, $hide_empty_cat) || !$include_terms_tree ) {

					$categories = get_terms( $taxonomy, array('orderby' => $cat_list_orderby,'hide_empty' => $hide_empty_cat, 'include' => gridfx_menu_cat_include($include_terms, $include_terms_tree, $taxonomy, $hide_empty_cat), 'exclude' => $exclude_terms, 'exclude_tree' => $exclude_terms_tree ) );

					if ($categories) {

				?>
				<div class=&quot;gridfx-sort&quot;>
					<select class=&quot;chosen-select filter_taxonomy&quot; data-taxonomy=&quot;<?php echo $taxonomy; ?>&quot;>
						<option value=&quot;&quot;><?php gridfx_nice_dropdown_all($taxonomy); ?></option>

						<?php foreach($categories as $cat) : ?>
						<option value=&quot;<?php echo $cat->slug; ?>&quot;><?php echo $cat->name; ?></option>
						<?php endforeach; ?>

					</select>
				</div>
				<?php
					}
				}
				}
				}
			}
		}
		?>

		<?php if ($sortmenu) { ?>
		<div class=&quot;gridfx-sort&quot;>
			<select class=&quot;chosen-select filter_sort&quot; data-placeholder=&quot;<?php _e('Sort Results by','gridfx'); ?>&quot;>
				<option value=&quot;&quot;></option>
				<option value=&quot;likes&quot; data-ascending=&quot;0&quot;><?php _e('Most Liked','gridfx'); ?></option>
				<option value=&quot;views&quot; data-ascending=&quot;0&quot;><?php _e('Most Viewed','gridfx'); ?></option>
				<option value=&quot;title&quot; data-ascending=&quot;1&quot;><?php _e('Alphabetically','gridfx'); ?></option>
				<option value=&quot;likes&quot; data-ascending=&quot;1&quot;><?php _e('Least Liked','gridfx'); ?></option>
				<option value=&quot;views&quot; data-ascending=&quot;1&quot;><?php _e('Least Viewed','gridfx'); ?></option>
				<option value=&quot;original-order&quot; data-ascending=&quot;1&quot;><?php _e('Clear / Reset','gridfx'); ?></option>
			</select>
		</div>
		<?php } ?>

		<?php if ($instantsearch) { ?>
		<div class=&quot;gridfx-search&quot;>
			<i class=&quot;grid-icon-search&quot;></i>
			<form action=&quot;/&quot; method=&quot;post&quot;>
				<input type=&quot;text&quot; value=&quot;&quot; placeholder=&quot;<?php echo $search_placeholder; ?>&quot; />
			</form>
			<i class=&quot;grid-icon-remove&quot;></i>
		</div>
		<?php } ?>

	</div><div class=&quot;gridfx-clear&quot;></div>
	<!--END FILTERS BAR-->

I am not sure but i think this is the important part for my problem

<?php if ($sortmenu) { ?>
		<div class=&quot;gridfx-sort&quot;>
			<select class=&quot;chosen-select filter_sort&quot; data-placeholder=&quot;<?php _e('Sort Results by','gridfx'); ?>&quot;>
				<option value=&quot;&quot;></option>
				<option value=&quot;likes&quot; data-ascending=&quot;0&quot;><?php _e('Most Liked','gridfx'); ?></option>
				<option value=&quot;views&quot; data-ascending=&quot;0&quot;><?php _e('Most Viewed','gridfx'); ?></option>
				<option value=&quot;title&quot; data-ascending=&quot;1&quot;><?php _e('Alphabetically','gridfx'); ?></option>
				<option value=&quot;likes&quot; data-ascending=&quot;1&quot;><?php _e('Least Liked','gridfx'); ?></option>
				<option value=&quot;views&quot; data-ascending=&quot;1&quot;><?php _e('Least Viewed','gridfx'); ?></option>
				<option value=&quot;original-order&quot; data-ascending=&quot;1&quot;><?php _e('Clear / Reset','gridfx'); ?></option>
			</select>
		</div>

Here you can find the i like it plugin.
https://wordpress.org/plugins/kk-i-like-it/

Maybe you found the code which i have to add / change in grid fx. Because i am a newbie in this :disappointed:
MyPage

If you have questions to me. Ask! :slight_smile: