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 function insert_country_terms() { | |
$taxonomy = 'country'; // Your custom taxonomy slug | |
// Define the countries hierarchy with country codes as values | |
$countries_hierarchy = array( | |
'Africa' => array( | |
'Algeria' => 'DZ', | |
'Angola' => 'AO', | |
'Benin' => 'BJ', | |
'Botswana' => 'BW', |
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 | |
/** | |
* Intended to run via WP-CLI using 'wp eval-file import-taxonomy-terms.php' command | |
*/ | |
// Ensure WordPress is loaded | |
if ( ! defined('WPINC') ) { | |
die; | |
} |
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
Hash change of Bootstrap Tab | |
---------------------------- | |
customized bootstrap tab component. here hash address will be changing on clicking on the tabs. and when ever copy this changed address to a browser url address accordingly it will show corresponding content in tabs |
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_action('init', 'add_countries', 100); | |
function add_countries() | |
{ | |
$country_array = array ( | |
'AF' => 'Afghanistan', | |
'AX' => 'Åland Islands', | |
'AL' => 'Albania', |
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
.ordered-numbers-list { | |
list-style: none; | |
counter-reset: order-counter; | |
li { | |
counter-increment: order-counter; | |
margin-bottom: 30px; | |
display:flex; | |
&::before { | |
content: counter(order-counter); | |
font-weight: bold; |
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
.row.equalize { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
.row.equalize > [class*="col-"] { | |
display: flex; | |
flex-direction: column; | |
} |
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
// *** Bootstrap five columns *** // | |
.col-5th { | |
flex: 0 0 20%; | |
max-width: 20%; | |
} | |
@include r("tablet") { | |
.col-sm-5th { | |
flex: 0 0 20%; |
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
// Media query mixins | |
@mixin r($point) { | |
@if $point== "mobile" { | |
@media (max-width: 767px) { | |
@content; | |
} | |
} | |
@if $point==768 or $point== "tablet" { | |
@media (min-width: 768px) { | |
@content; |
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 | |
/** | |
* Set text domain | |
*/ | |
function get_text_domain() { | |
return 'textdomain'; | |
} | |
/** |
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 | |
$languages = icl_get_languages('skip_missing=0'); | |
if(1 < count($languages)){ | |
echo '<ul>'; | |
foreach($languages as $l){ | |
if(!$l['active']) { | |
$lang = '<li class="lang-button"><a href="'.$l['url'].'">'.$l['language_code'].'</a></li>'; | |
} else { | |
$lang = '<li class="lang-button"><a class="current-lang" href="'.$l['url'].'">'.$l['language_code'].'</a></li>'; | |
} |
NewerOlder