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
/* Select Menu for Specific Posts */ function menu_for_spesific_post( $args ) { $slug_post = get_post_field( 'post_name', get_the_ID() ); $list_post = array( 'hello-world', 'baru', 'slug-2', 'slug-3' ); /* List Posts by Slug */ if ( in_array( $slug_post, $list_post ) ) { /* If Main Menu (navigation) */ if ( 'navigation' === $args['theme_location'] ) { /* Get Menu ID by Menu Name */ $term = get_term_by('name', 'Footer Navigation', 'nav_menu'); $menu_id = $term->term_id; $args['menu'] = $menu_id; } } return $args; } // add_filter( 'wp_nav_menu_args', 'menu_for_spesific_post' );
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)