Multi str_replace php
str_replace( array( '<', '>', '/', ',', '{', '}', '?', '*' ), '', $value[0]->post_content )
Renaming existing tabs. add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 ); function woo_rename_tabs( $tabs ) { $tabs[’description’] = array( ‘title’ => __( ‘WORKING’, ‘woocommerce’ ), ‘priority’ => 10, ‘callback’ => ‘the_content’ ); $tabs[’reviews’] = array( ‘title’ => __( ‘FAULTY’, ‘woocommerce’ ), ‘priority’ => 30, ‘callback’ => ‘woo_before_tabs_title’ ); return $tabs; } function woo_before_tabs_title() { the_field(‘faulty’); } This code…
Get Header Title function custom_category_page_title() { global $wp_query, $wpdb; $category_ = get_query_var(‘cat’); $current_cat = get_category ($category_); $category_id = $current_cat->term_id; echo ‘<header class="entry-header">’; echo'<h1 class="entry-title" itemprop="headline">’.get_cat_name( $category_id ).'</h1>’; echo ‘</header>’; }
function tml_title( $title, $action ) { if ( is_user_logged_in() ) { $user = wp_get_current_user; if ( ‘profile’ == $action ) $title = ‘Your Profile’; else $title = sprintf( ‘Welcome, %s’, $user->display_name ); } else { switch ( $action ) { case ‘register’ : $title = ‘Sign Up’; break; case ‘lostpassword’: case ‘retrievepassword’: case ‘resetpass’: case…
Remove ” Edit ” page / post link when logged in add_filter( ‘genesis_edit_post_link’, function(){ return false; }); Default functions <?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child…
Re-register the default genesis sidebar into your function.php. See the image above for html output. genesis_register_sidebar( array( ‘id’ => ‘sidebar’, ‘name’ => __( ‘Primary Sidebar’, ‘genesis’ ), ‘before’ => ‘<div id="%1$s" class="widget %2$s">’, ‘after’ => ‘</div></div>’, ‘before_title’ => ‘<h4 class="widget-title widgettitle">’, ‘after_title’ => ‘</h4><div class="widget-inner">’ ) );
How to get the current page slug? global $post; $slug = get_post( $post )->post_name;