function dropdown_menu_shortcode($atts) { // get the attributes $atts = shortcode_atts( array( ‘id’ => ”, ), $atts, ‘dropdown_menu’ ); // get the menu $menu = wp_get_nav_menu_object( $atts[‘id’] ); $menu_items = wp_get_nav_menu_items($menu->term_id); // get the current URL $current_url = home_url( $_SERVER[‘REQUEST_URI’] );…Continue reading
add_filter( ‘aioseo_sitemap_images’, /** * Find new images inside the post content which has Elementor galleries. * It only works for self-hosted attachments. * * @param array $images The images already found. * @param object $post The post object * @return…Continue reading
add_filter( ‘aioseo_sitemap_images’, /** * Find new images inside the post content which has Elementor galleries. * It only works for self-hosted attachments. * * @param array $images The images already found. * @param object $post The post object * @return…Continue reading
$u_time = get_the_time( ‘U’ ); $u_modified_time = get_the_modified_time( ‘U’ ); // Only display modified date if 24hrs have passed since the post was published. if ( $u_modified_time >= $u_time + 86400 ) { $updated_date = get_the_modified_time( ‘F jS, Y’ );…Continue reading
add_action( ‘admin_bar_menu’, function($wp_admin_bar) { $wp_admin_bar->add_node( array( ‘id’ => ‘plugins’, ‘title’ => ‘Plugins’, ‘href’ => esc_url( admin_url( ‘plugins.php’ ) ), ‘meta’ => false )); }, 999);Continue reading
add_action( ‘current_screen’, function() { $screen = get_current_screen(); if ( $screen->id !== “dashboard” ) { add_action( ‘admin_enqueue_scripts’, function() { echo ‘ ‘; }); } });Continue reading
/** * Snippet Name: Custom excerpt for password protected pages * Snippet URL: https://wpcustoms.net/snippets/custom-excerpt-password-protected-pages/ */ function password_required_excerpt( $excerpt ) { if ( post_password_required() ) { $excerpt = ‘This is a private page to request the password please contact the site…Continue reading
/** * Plugin Name: AffiliateWP – Affiliate Area Custom Styling * Plugin URI: https://affiliatewp.com * Description: Adds custom CSS styling to the Affiliate Area * Author: Andrew Munro, Sumobi * Author URI: http://sumobi.com * Version: 1.0 */ function affwp_affiliate_area_styling() {…Continue reading