Untitled Snippet

$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

Progress Bar PHP

function enqueue_custom_styles_scripts() { wp_enqueue_style(‘progress-bar-style’, get_template_directory_uri() . ‘/progress-bar-style.css’); wp_enqueue_script(‘progress-bar-script’, get_template_directory_uri() . ‘/progress-bar.js’, array(‘jquery’), null, true); } add_action(‘wp_enqueue_scripts’, ‘enqueue_custom_styles_scripts’); function custom_progress_bar_shortcode($atts) { $atts = shortcode_atts([ ‘range_major’ => ‘100’, ‘current_major’ => ’50’, ‘label_major’ => ‘Major Progress’, ‘range_minor’ => ‘100’, ‘current_minor’ => ’25’ ],…Continue reading

Menu Item image Animation on Hover

.header-navigation .menu .menu-item:hover { background: url(https://ecommerce-base-1.instawp.xyz/wp-content/uploads/2024/05/Plan-De-Travail-14_7png.webp) no-repeat; background-size: contain; background-position: center; transition: 0.5s; }Continue reading

Rebellion white label

/* WHITE LABEL ADMIN DASHBOARD: Modify the admin footer text */ add_filter( ‘admin_footer_text’, ‘rd_modify_admin_footer’ ); function rd_modify_admin_footer () { echo ‘Website managed by Rebellion Marketing | [email protected]‘; } /* WHITE LABEL ADMIN DASHBOARD: Replace Link URL */ add_filter( ‘login_headerurl’, ‘rd_login_url’…Continue reading

Elementor’s posts query (Earth fruits category)

add_action( ‘elementor/query/earthfruits_category_query’, function( $query ) { $term_ids = get_terms([ ‘taxonomy’ => ‘category’, ‘slug’ => [‘earthfruits’, ‘earthfruits-tools’, ‘earthfruits-patreonmods’, ‘earthfruits-servermods’, ‘earthfruits-exclusivemods’], ‘fields’ => ‘ids’, ‘hide_empty’ => true, ]); if ( !empty($term_ids) && !is_wp_error( $term_ids ) ) { $query->set( ‘category__in’, $term_ids ); }…Continue reading