Issue with WordPress category search

You can search post by modify the query using pre_get_post filter. add this code inside your functions.php file add_filter(‘pre_get_posts’, ‘search_by_category’); function search_by_category($wp_query) { if (isset($_GET[‘cat’]) && !is_admin()) { $wp_query->set(‘category__in’, array($_GET[‘cat’])); } } Before using any query variable you must have to register/add using add_query_var. function add_category_query_string() { global $wp; $wp->add_query_var(‘cat’); } add_filter(‘init’, ‘add_category_query_string’); let me … Read more

Create a new post on a specified publish date via link?

Here is the solution I came up with! In my plugin functions: <?php function ficma_inline_script() { $datedata = explode(“-“, $_POST[‘date’]); $year = $datedata[0]; $month = $datedata[1]; $day = $datedata[2]; $newdate = date(“M d, Y”, mktime(0, 0, 0, $month, $day, $year)); ?> <script type=”text/javascript”> document.getElementById(“mm”).value = “<?=$month ?>”; document.getElementById(“cur_mm”).value = “<?=$month ?>”; document.getElementById(“hidden_mm”).value = “<?=$month ?>”; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)