Skip to content

Instantly share code, notes, and snippets.

<script type=”text/javascript”>
jQuery(‘document’).ready(function($){
$(‘[title]’).removeAttr(‘title’);
});
</script>
@priyabratary
priyabratary / gist:40f15c125dcda1430f2d59b0e65e145e
Created October 9, 2018 09:37
wpml 2 logos for 2 language
<?php if(ICL_LANGUAGE_CODE=='en'){ ?>
<img src="logoEng.jpg">
<?php } ?>
<?php if(ICL_LANGUAGE_CODE=='ru'){ ?>
<img src="logoRus.jpg">
<?php } ?>
@priyabratary
priyabratary / gist:35114a7eb76bd16befe6dec262bde47d
Created October 9, 2018 09:33
polylang 2 logo for 2 language
<?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 August 18, 2018 14:18
future post show now
// 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;
@priyabratary
priyabratary / li.css
Created August 8, 2018 19:41
text indent ul
.vc_column-inner ul li {
padding-left: 1.28571429em;
text-indent: -1.28571429em;
}
@priyabratary
priyabratary / dropdown.css
Created August 6, 2018 11:12
weebly drop down menu
/*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;
.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 July 21, 2018 14:10
WordPress menu registration
<?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' );
@priyabratary
priyabratary / gist:85e734ca0911b47397aabbc42658b258
Created July 19, 2018 14:09
pollylang read more translation
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');