Home › Forums › All Other Themes › SKT Newspaper Pro – Search Engine
- This topic has 20 replies, 2 voices, and was last updated 3 years, 6 months ago by Markus.
-
AuthorPosts
-
April 27, 2021 at 12:13 pm #178077
Great!! ????
April 28, 2021 at 1:24 pm #178119Hi,
do you tryed it a 2.nd time?
Regards
MarkusApril 29, 2021 at 9:47 pm #178162Hello,
I’ve seen you put the same PHP code to my function.php them the last time.
BUT: with this code the option “edit picture” will NOT work
After insering the code – do you test the point “edit picture” ?
This are the last original lines php code
</script>
<?php }
add_action(‘wp_head’,’custom_slide_function’); ?>
//End of original function.php code – picture edit works – sort by date works not – is the “]” after <?php correct? there is no open “{” first !?//<?php
add_filter(‘posts_orderby’,’my_sort_custom’,10,2);
function my_sort_custom( $orderby, $query ){
global $wpdb;if(!is_admin() && is_search())
$orderby = $wpdb->prefix.”posts.post_type ASC, {$wpdb->prefix}posts.post_date DESC”;return $orderby;
}
// This is the new code from you for sorting by date – with this code the “edit picture” will NOT work //At the moment I use the old code, because I must work on the site!
EDIT: I test the complete code from your original function.php in a code checker.
Result: line 802 have errors:
<?php function custom_slide_function(){ ?>Is this a old bug inside the code?
Regards
MarkusMay 3, 2021 at 7:33 pm #178360Hi,
do you maybe have an answer for me?
Regards
MarkusMay 4, 2021 at 12:22 pm #178499Hi,
We tried it a 2 time. But unfortunately sorting date and edit picture these two functions are not working together.
Regards,
DaveMay 5, 2021 at 9:11 am #178589Hello,
I’m a bit confused, because you have written the original code. Or not? So, usualy you must know, where to edit the code.
I use your themes and your service more than 5 years. I spent more than 1k US-Dollar for business with you. I’m a litle bit disapointed on the answer “it works not together”.Anyway, I found a plugin for the job “Ajax Search Lite”. It overwrites the results from the internal search engine and gives me results sortet by date. But: it is one more – usualy – not needed plugin.
Regards
Markus -
AuthorPosts
- You must be logged in to reply to this topic.