Skip to content

Instantly share code, notes, and snippets.

View gist:aa47c0235c2b1384175ca4b68d1d8ab5
<script type=”text/javascript”>
jQuery(‘document’).ready(function($){
$(‘[title]’).removeAttr(‘title’);
});
</script>
View gist:40f15c125dcda1430f2d59b0e65e145e
<?php if(ICL_LANGUAGE_CODE=='en'){ ?>
<img src="logoEng.jpg">
<?php } ?>
<?php if(ICL_LANGUAGE_CODE=='ru'){ ?>
<img src="logoRus.jpg">
<?php } ?>
View gist:35114a7eb76bd16befe6dec262bde47d
<?php if ( get_bloginfo( 'language' ) == 'en-US' ) { ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>
"><img src="//asdaa-bcw.com/wp-content/uploads/2018/09/asdaa-bcw.jpg" /></a>
<?php } elseif ( get_bloginfo( 'language' ) == 'ar' ) { ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>
"><img src="//asdaa-bcw.com/wp-content/uploads/2018/10/asdaa_logo_ar.png" /></a>
<?php } ?>
@priyabratary
priyabratary / functions.php
Created Aug 18, 2018
future post show now
View functions.php
// future post
function setup_future_hook() {
// Replace native future_post function with replacement
remove_action('future_post', '_future_post_hook');
add_filter( 'wp_insert_post_data', 'nacin_do_not_set_posts_to_future' );}
function nacin_do_not_set_posts_to_future( $data ) {
if ( $data['post_status'] == 'future' && $data['post_type'] == 'gallery' )
$data['post_status'] = 'publish';
return $data;
View li.css
.vc_column-inner ul li {
padding-left: 1.28571429em;
text-indent: -1.28571429em;
}
@priyabratary
priyabratary / dropdown.css
Created Aug 6, 2018
weebly drop down menu
View dropdown.css
/*dropdown menu*/
#wsite-menus .wsite-menu-wrap {
border-color: #ececec !important;
border-radius: 0 !important;
margin: 2px 0 0;
font-size: 14px;
text-align: left;
View gist:dd31bb25f9b00392dcd788c6970b0715
.searchandfilter .postform { height: 38px !important; padding: 4px 6px 4px 6px !important; }
.searchandfilter li input[type="text"] { height: 38px !important; padding: 4px 6px 4px 6px !important; }
.searchandfilter li input[type="submit"] { height: 38px !important; padding: 0px 20px !important; }
.appointment form.wpcf7-form textarea{
font-size: 18px;
color: #4d4d4d !important;
}
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="range"], input[type="date"], textarea, input.text, input[type="search"], select, textarea, .woo-type10.woocommerce select {
font-size: 16px;
@priyabratary
priyabratary / functions.php
Created Jul 21, 2018
WordPress menu registration
View functions.php
<?php wp_nav_menu( array( 'theme_location' => 'footer-menu', 'container_class' => 'footer-menu', 'items_wrap' => '<ul class="list-inline">%3$s</ul>', ) );
?>
//footer menu
function register_footer_menu() {
register_nav_menu('footer-menu',__( 'Footer Menu' ));
}
add_action( 'init', 'register_footer_menu' );
View gist:85e734ca0911b47397aabbc42658b258
function modify_read_more_link() {
return '<a href="' . get_permalink() . '" class="more-link btn-a btn-a_fill_theme">' . pll__('string translation') . '</a>';
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );
pll_register_string('my-theme', 'string translation');