What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-13 21:08:11
wordpress ajax filter code
add_action('wp_ajax_myfilter', 'misha_filter_function'); // wp_ajax_{ACTION HERE} add_action('wp_ajax_nopriv_myfilter', 'misha_filter_function'); function misha_filter_function(){ $args = array( 'orderby' => 'date', // we will sort posts by ... Add solution -
PHP 2021-11-13 07:34:22
wordpress remove current post in sidebar php
<?php $currentID = get_the_ID(); $my_query = new WP_Query( array('cat' => '1', 'showposts' => '5', 'post__not_in' => array($currentID))); while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <h2><a href="<?ph... Add solution -
Other 2021-11-05 14:59:15
display a list of WordPress custom posts
<?php $loop = new WP_Query( array( 'post_type' => 'article', 'posts_per_page' => 10 ) ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php the_title( '<h2 class="entry-title"><a href=&... Add solution -
TypeScript 2021-10-18 15:45:06
related posts wordpress without plugin
<?php /** * Blog Template Part for displaying single blog related posts * * @package Thype * @subpackage Blog Parts * @since 1.0.0 * */ $the_query = codeless_get_related_posts( get_the_ID(), 4 ); global $cl_from_element; $cl_from_element['is_r... Add solution -
TypeScript 2021-10-10 11:20:05
acf wordpress loop through and display blog posts order by date and type
$posts = get_posts(array( 'numberposts' => -1, 'post_type' => 'post', 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'color', 'value' => array('red', 'orange'), 'compare' => 'IN', ), array( ... Add solution -
TypeScript 2021-09-25 13:08:03
wordpress display posts from specific category on page
The argument isn't category, it is cat. Your query fails because you are using an argument that doesn't exist. $args = array( 'post_type' => 'post' , 'orderby' => 'date' , 'order' => 'DESC' , 'posts_per_page' => 6, 'cat' =&g... Add solution
Best helpers
Joker13
+5
Remmy Kasili
+5
Anand GV
+5
Manx rat
+5
Jokim
+5
Nitro2k01
+5
Letomkov
+5
Glob Cropper
+5