Skip to content

Instantly share code, notes, and snippets.

@jmabbas
jmabbas / style.css
Created March 29, 2025 10:55
Electro - YITH Heart icon Dark style
a.yith-wcwl-add-to-wishlist-button {
font-size: 13px;
align-items: flex-start !important;
gap: 3px !important;
}
a.yith-wcwl-add-to-wishlist-button svg {
width: 17px !important;
height: 17px;
}
@jmabbas
jmabbas / functions.php
Created March 26, 2025 10:33
Electro Custom content between header and topbar
add_action( 'electro_before_header', 'custom_header_content', 15 );
function custom_header_content() { ?>
<div class="container">
cusotm content
</div>
<?php
}
@jmabbas
jmabbas / functions.php
Created March 26, 2025 05:49
Silicon Offcanvas
function silicon_header_navbar_offcanvas() {
$header_class = silicon_custom_sticky_header_options();
$dark_css = strpos( $header_class, 'navbar-dark' ) ? ' bg-dark' : '';
?>
<div id="navbarNav" class="offcanvas offcanvas-end<?php echo esc_attr( $dark_css ); ?>">
<div class="offcanvas-header border-bottom">
<h5 class="offcanvas-title"><?php echo esc_html__( 'Menu', 'silicon' ); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
@jmabbas
jmabbas / functions.php
Created March 21, 2025 12:14
Mytravel - Header account
function mytravel_header_navbar_account() {
$header_style = mytravel_get_header_style();
if ( mytravel_header_signin_enable() ) {
$myt_page_options = array();
if ( function_exists( 'mytravel_option_enabled_post_types' ) && is_singular( mytravel_option_enabled_post_types() ) ) {
$clean_meta_data = get_post_meta( get_the_ID(), '_myt_page_options', true );
$_myt_page_options = maybe_unserialize( $clean_meta_data );
@jmabbas
jmabbas / functions.php
Created March 21, 2025 10:31
Finder Listing page header
function finder_hivepress_listings_page_header() {
$listing_style = finder_hivepress_get_listings_style();
$total_results = finder_hivepress_get_listings_result_count();
// Get page ID.
$listing_page_id = finder_hivepress_get_listings_page_id();
$listing_page_title = get_the_title( $listing_page_id );
if ( ! $listing_page_id ) {
@jmabbas
jmabbas / functions.php
Created March 17, 2025 06:56
Front - Jobs card with category label
function front_job_listing_list_card_body_content() {
global $post;
$post = get_post( $post );
$category_slugs = '';
$slugs = wp_get_object_terms( $post->ID, 'job_listing_category', array( 'fields' => 'slugs' ) );
if ( ! empty( $slugs ) && is_array( $slugs ) ) {
$category_slugs = implode( ',', $slugs );
}
@jmabbas
jmabbas / functions.php
Created March 17, 2025 06:44
Front - Single job with company title in sidebar
function front_single_job_listing_company() {
?>
<div class="mb-4" style="text-align: center;">
<?php
front_the_company_logo( 'thumbnail', 'u-clients mb-4 123' );
?>
<div>
<?php the_company_name(); ?>
</div>
<?php
@jmabbas
jmabbas / functions.php
Created March 17, 2025 06:32
Front - Single Job sidebar
function front_single_job_listing_summary_icon_block_elements() {
$args = apply_filters( 'front_single_job_listing_summary_icon_block_elements_args', array(
'job_location' => array(
'text_1' => get_the_job_location(),
'text_2' => esc_html__( 'Location', 'front' ),
'icon' => 'fas fa-map-marked-alt',
),
'job_type' => array(
'text_1' => front_get_taxomony_data( 'job_listing_type' ),
'text_2' => esc_html__( 'Job Type', 'front' ),
@jmabbas
jmabbas / class-wp-bootstrap-navwalker.php
Created March 12, 2025 08:23
Mytravel - Parent menu clickable
<?php
/** Update this file in themes > mytravel > inc > classes > class-wp-bootstrap-navwalker.php themes path */
/**
* WP Bootstrap Navwalker
*
* @package WP-Bootstrap-Navwalker
*
@jmabbas
jmabbas / functions.php
Last active March 7, 2025 14:18
Electro Default header search
function electro_navbar_search() {
?>
<div class="site-search-custom asdf" style="display: flex;width: 44%;flex-direction: column;">
<div><i class="fas fa-phone"></i> Call us <a style="color:#0787EA; font-size:12px" href="tel:+61296006655">(02) 9600 6655</a></div> <?php
if ( ! apply_filters( 'electro_use_third_party_navbar_search', false ) ) {
electro_get_template( 'sections/navbar-search.php' );
} else {
do_action( 'electro_navbar_search_third_party' );
}
?></div><?php