Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
385 views
in Q2A Core by
how to deactive "most views " from script ?
Q2A version: 1.8.6

1 Answer

0 votes
by
edited by

You can hide the "most views" navigation element by adding the following snippet to the stylesheet of your theme:

.qa-nav-sub-views {
  display: none;
}

Disabling the URL parameter "sort=views" entirely might be accomplished by overriding the function qa_get() and changing a return value "views" to null:

function qa_get($field) {
  $val = qa_get_base($field);
  return ($field === 'sort' and $val === 'views') ? null : $val;
}

I cannot guarantee that this won't have side effects, so use at your own risk.

And since you went out of your way to downvote my answer I'll leave it to you to figure out where to put that function. Have fun.

by
deactive no hide this page "Site.com/?qa=questions&sort=views"
...