Skip to content

Instantly share code, notes, and snippets.

View nayonptk's full-sized avatar

Md. Nayon Hossain nayonptk

View GitHub Profile
@nayonptk
nayonptk / Web Right Click Disable
Last active June 3, 2020 12:16
website right click disable
<body oncontextmenu ="return false;"> </body>
(function($){
$(".site-slider").owlCarousel({
loop: true,
items: 1,
autoplay:true,
nav:true,
dots: false,
// navText: ['<i class="fas fa-angle-left"></i>, <i class="fas fa-angle-right"></i>'],
/*-------------------------------------
Window load function
-------------------------------------*/
$(window).on('load', function () {
// Page Preloader
$('.preloader-img').fadeOut('slow', function () {
$(this).remove();
});
$('.classname').each(function () {
$(this).prop('Counter',0).animate({
Counter: $(this).text()
}, {
duration: 2000,
easing: 'swing',
step: function (now) {
$(this).text(Math.ceil(now));
}
});
//Main menu fixed
var nav = $('.rhealth-header-section-area');
$(window).scroll(function () {
if ($(this).scrollTop() > 80) {
nav.addClass("fixed");
} else {
nav.removeClass("fixed");
}
});
<!-- tab area start -->
<div class="row">
<div class="col-xl-12">
<div class="tanry-shops-tab-menu">
<!-- Nav tabs -->
<ul class="nav">
<?php $all_terms = get_terms(array(
// Function
function cb_get_embedded_media( $type = array() ){
$content = do_shortcode( apply_filters( 'the_content', get_the_content() ) );
$embed = get_media_embedded_in_content( $content, $type );
if( in_array( 'audio' , $type) ):
$output = str_replace( '?visual=true', '?visual=false', $embed[0] );
else:
$output = $embed[0];
{ "keys": ["ctrl+shift+r"], "command": "reindent", "args": {"single_line":false}}
prefernces>key binding
@nayonptk
nayonptk / searchform.php
Created September 25, 2019 09:26 — forked from hmbashar/searchform.php
wordpress search form markup changes.
<!-- shapehost sidebar search -->
<div class="shapehost-sidebar-search">
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input type="search" id="<?php echo $unique_id; ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search and type enter &hellip;', 'placeholder', 'shape' ); ?>" value="<?php echo get_search_query(); ?>" name="s" >
<button type="submit" class="search-submit"><i class="fa fa-search"></i></button>
</form>
</div>
<!-- shapehost sidebar search end-->
@nayonptk
nayonptk / Avada Theme scripts handler.php
Created September 25, 2019 09:26 — forked from hmbashar/Avada Theme scripts handler.php
To build on what Michael C wrote, and based on another post that I came across (https://theme-fusion.com/forums/topic/related-posts-not-showing-on-post-pages/), I was able to put together a solution to this using the Avada Child Theme. I found that disabling Fusion Builder Elements in the Fusion Builder settings did not consistently remove the d…
<?php
add_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' );
function custom_disable_theme_js() {
Fusion_Dynamic_JS::deregister_script('avada-comments');
Fusion_Dynamic_JS::deregister_script('avada-general-footer');
Fusion_Dynamic_JS::deregister_script('avada-mobile-image-hover');
Fusion_Dynamic_JS::deregister_script('avada-quantity');
Fusion_Dynamic_JS::deregister_script('avada-scrollspy');
Fusion_Dynamic_JS::deregister_script('avada-select');