This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this code for function file | |
| // select nav menu list | |
| function select_nav_menu(){ | |
| $menus = wp_get_nav_menus(); | |
| $menulists = []; | |
| foreach( $menus as $menu ){ | |
| $menulists[ $menu->slug ] = $menu->name; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Login to your cpanel and open your .htaccess file then put this code on .htaccess file. | |
| <IfModule mod_headers.c> | |
| Header set Access-Control-Allow-Origin "*" | |
| </IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Get Post Type | |
| * return array | |
| */ | |
| function igroup_get_post_types( $args = [] ) { | |
| $post_type_args = [ | |
| 'show_in_nav_menus' => true, | |
| ]; | |
| if ( ! empty( $args['post_type'] ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function disable_plugin_updates( $value ) { | |
| unset( $value->response['plugin_folder_name/main_plugin_file.php'] ); | |
| return $value; | |
| } | |
| add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' ); | |
| example by elementor : | |
| function disable_plugin_updates( $disable_elementor_update ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var brandSlider = $('.brand-banner'); | |
| brandSlider.owlCarousel({ | |
| loop: false, | |
| nav: false, | |
| dots: false, | |
| smartSpeed: 500, | |
| margin: 0, | |
| responsive: { | |
| 0: { | |
| items: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // remove text/javascript and text/css for w3 validate | |
| add_filter('style_loader_tag', 'prefix_remove_type_attr', 10, 2); | |
| add_filter('script_loader_tag', 'prefix_remove_type_attr', 10, 2); | |
| function prefix_remove_type_attr($tag, $handle) { | |
| return preg_replace( "/type=['\"]text\/(javascript|css)['\"]/", '', $tag ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery('.project-filters button').each(function (){ | |
| jQuery(this).on("click", function(){ | |
| var $active = jQuery(this).attr('class'); | |
| if($active == 'commercial is-active'){ | |
| jQuery('.view_all_button').css('display','none'); | |
| } else { | |
| jQuery('.view_all_button').css('display','block'); | |
| } | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .tab-content{ | |
| position: relative; | |
| } | |
| .tab-content>.tab-pane { | |
| display: block; | |
| visibility: hidden; | |
| } | |
| .tab-content>.tab-pane.active { | |
| visibility: visible; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(".menu-selector ul li a").on('click', function() { | |
| if (this.hash !== "") { | |
| var hash = this.hash; | |
| $('html, body').animate({ | |
| scrollTop: $(hash).offset().top | |
| }, 800, function(){ | |
| window.location.hash = hash; | |
| }); | |
| } | |
| }); |