Onclick open posts displayed in slider in a popup [closed]

I am giving you an idea for this, you have to use jQuery for the popup and the below syntax will give you the current post data in a HTML popup. while ($the_query->have_posts()): $the_query->the_post(); echo ‘<div class=”non-popup”>’; echo ‘<div class=”card-title” id=”card-‘.get_the_title.'”>’.get_the_title().'</div>’; write you front end code + html (http://screenshotlink.ru/eff3d7431f4fbcd6a03ca5fcbbc41cdd.png) echo ‘</div>’; echo ‘<div class=”popup” style=”display:none;”>’; … Read more

How to sort the post to a specific category

wp_query() is good option to show list of post in wordpress. If you want to show post of certain category then it can be done by using category’s ID Or by Category’s slug. $paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; $args = array( ‘post_type’ => ‘post’, //Specyfying post type ‘cat’=> 1, //Selecting post category by … Read more

How to make category for word post_content

I personally find it easier to use built-in WP functions rather than running straight MySQL queries, so here’s one option: <?php global $wpdb; // replace ‘yoursearchword’ with whatever you’re looking for. // the two % symbols are to find the word no matter what comes before or after. $query = “SELECT * FROM wp_posts WHERE … Read more

Polylang – display one post into 3 categories with different lang [closed]

to retrieve all posts of all languages in a category, you need to desactivate the auto-translate during the request. you can try that : $categories = get_the_category(); $category_id = $categories[0]->cat_ID; remove_filter( ‘get_terms_args’, array( PLL()->auto_translate, ‘get_terms_args’ ), 10, 2 ); $posts = []; foreach (pll_languages_list() as $language_code) { $posts = array_merge( $posts , get_posts([ “category” => … Read more

Last updated post in wordpress homepage first position

To achieve the intended result, you must change the sorting from default by date of publication to the modification date. To do this, you can use the pre_get_posts filter hook, the appropriate value for the orderby query parameter can be found here. To apply changes only on the home page, the conditional tag is_home() will … Read more

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