Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/* Exclude Search Post for ajax search */ function custom_search_post( $statement ) { /* List Post by Permalink */ $list_post = array( 'http://localhost/wordpress2/hello-world/', 'http://localhost/wordpress2/shadow-tactics-blades-of-the-shogun-review/' ); foreach( $list_post as $key => $value ) { $list_post[$key] = (string) url_to_postid( $value ); } $statement['post__not_in'] = $list_post; return $statement; } add_filter( 'jnews_live_search_args', 'custom_search_post' ); /* Exclude Search Post */ function wpb_modify_search_query( $query ) { global $wp_the_query; if( $query === $wp_the_query && $query->is_search() ) { /* List Post by Permalink */ $list_post = array( 'http://localhost/wordpress2/hello-world/', 'http://localhost/wordpress2/shadow-tactics-blades-of-the-shogun-review/' ); foreach( $list_post as $key => $value ) { $list_post[$key] = (string) url_to_postid( $value ); } $query->set( 'post__not_in', $list_post ); } } add_action( 'pre_get_posts', 'wpb_modify_search_query' );
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)