Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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="<?php the_permalink(); ?>"><?php the_title() ?></a></h2>
<?php the_content(); ?>
<?php endwhile; ?>
Comment

PREVIOUS NEXT
Code Example
Php :: php mysql remove by timestamp older than a month 
Php :: how to create php message 00 
Php :: set php version for a domain with whm api 
Php :: Personnaliser le logo de connexion WordPress sans plugin 
Php :: Uncaught TypeError: call_user_func(): Argument #1 
Php :: php mysql insert record if not exists in table 
Php :: php blob to string 
Php :: paygate logout session on callback laravel 
Php :: laravel eager loading pass variable in withCount where condition 
Php :: how-to-add-pagination-in-search-results wordpress 
Php :: command ui is not found 
Php :: requires ext-pcntl 
Php :: rebuild joomla menu 
Php :: php check if cli mode 
Php :: phpmyadmin account locked 
Php :: pusher in laravel array_merge(): Argument #2 is not an array 
Php :: get header sent var 
Php :: laravel error reporting code for view 
Php :: customize response body with filters laravel 
Php :: how to increase wp mailster attachment size 
Php :: storefront header cart 
Php :: old codestar textarea field 
Php :: mysql_query not working in php 7 
Php :: laravel factory counter 
Php :: drupal 9 custom local stream wrapper 
Php :: php division without round 
Php :: same title 2 gigs are allowed in fiverr 
Php :: does grepper use PHP 
Php :: net::ERR_CONNECTION_REFUSED php 
Php :: carbon get difference between two dates in years and months 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =