This file contains 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
<?php | |
// Add custom meta field to admin column for custom post type "story" | |
function add_story_custom_meta_to_admin_column($column_name, $post_id) { | |
if ($column_name == 'custom_meta_column') { | |
$stories_meta = get_post_meta($post_id, 'stories-metabox', true); | |
// Check if the 'title-keyword' key exists in the meta data | |
if (array_key_exists('title-keyword', $stories_meta)) { |
This file contains 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
[ | |
{"label": "Products", "url": "#"}, | |
{"label": "Learn", "url": "#"} | |
] |
This file contains 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
<?php | |
Kirki::add_config('theme_config_id', array( | |
'capability' => 'edit_theme_options', | |
'option_type' => 'theme_mod', | |
)); | |
Kirki::add_section('main_menu_settings', array( | |
'title' => __('Main Menu Settings', 'textdomain'), | |
'priority' => 30, | |
)); |
This file contains 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
/*======= Notebook =======*/ | |
.note-book-wrapper { | |
max-height: 710px; | |
overflow-y: scroll; | |
} | |
.note-book-wrapper::-webkit-scrollbar-track { | |
border-radius: 3px; | |
background-color: transparent; | |
} | |
.note-book-wrapper::-webkit-scrollbar { |
This file contains 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
new \Kirki\Field\Repeater( | |
[ | |
'settings' => 'repeater_setting_4', | |
'label' => esc_html__( 'Works Settings', 'kirki' ), | |
'section' => 'section_id', | |
'row_label' => [ | |
'type' => 'field', | |
'value' => esc_html__( 'Your Custom Value', 'kirki' ), |
This file contains 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 mydeals_styles() { | |
if( is_page(['all-deals'])) { | |
wp_enqueue_style( 'bootstrap-test', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '5.3.11', false ); | |
} | |
} | |
add_action('wp_enqueue_scripts', 'mydeals_styles'); | |
This file contains 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
document.addEventListener("DOMContentLoaded", function(){ let divc = document.querySelectorAll('div[style]'); for (let i = 0, len = divc.length; i < len; i++) { let actdisplay = window.getComputedStyle(divc[i], null).display; let actclear = window.getComputedStyle(divc[i], null).clear; if(actdisplay == 'block' && actclear == 'both') { divc[i].remove(); } } }); |
This file contains 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
$(document).ready(function(){ | |
// jQuery methods go here... | |
$("p").on({ | |
mouseenter: function(){ | |
$(this).css("background-color", "lightgray"); | |
}, | |
mouseleave: function(){ | |
$(this).css("background-color", "lightblue"); | |
}, |
This file contains 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
// Breakpoints. | |
$breakpoints: ( | |
xs: 425px, | |
sm: 576px, | |
md: 768px, | |
lg: 992px, | |
xl: 1200px, | |
xxl: 1400px, | |
c1600: 1600px, | |
); |
This file contains 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
"liveSassCompile.settings.formats": [ | |
{ | |
"format": "expanded", | |
"extensionName": ".css", | |
"savePath": "assets/css", | |
// "savePathSegmentKeys": null, | |
// "savePathReplaceSegmentsWith": null | |
} | |
], | |
"liveSassCompile.settings.generateMap": true, |