Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Everyday Hard Working ...

Ulziibat Nansaltsog ulziibat-n

💭
Everyday Hard Working ...
  • Greenland
View GitHub Profile
View Pagination
if ( ! function_exists( 'dimative_the_pagination_default' ) ) {
/**
* Default Pagination
*
* @see https://www.billerickson.net/custom-pagination-links/
*
* @param int $max_num_pages Max num pages.
* @param string $classes Pagination Classes.
*/
function dimative_the_pagination_default( $max_num_pages = null, $classes = '' ) {
@ulziibat-n
ulziibat-n / aricolor.md
Created Dec 18, 2020 — forked from aristath/aricolor.md
ariColor PHP Library for WordPress plugins and themes
View aricolor.md

ariColor is a PHP library that will hopefully help WordPress theme developers do their job easier and more effectively.

It does not provide you with methods like lighten(), darken() etc. Instead, what it does is give you the ability to create these yourself with extreme ease by giving you all the properties of a color at hand, and allowing you to manipulate them however you see fit.

Example:

First, let's create our color object:

$color = ariColor::newColor( '#049CBE', 'hex' );
View nx-customizer.php
<?php
function idesign_customizer_config() {
$url = get_stylesheet_directory_uri() . '/inc/kirki/';
/**
* If you need to include Kirki in your theme,
* then you may want to consider adding the translations here
@ulziibat-n
ulziibat-n / font-stacks.css
Created Dec 15, 2020
Modern font stacks.
View font-stacks.css
/* Modern Font Stacks */
/* System */
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
@ulziibat-n
ulziibat-n / WordPress Tailwind Social Share
Created Jul 15, 2020
WordPress Tailwindcss Social Share HTML
View WordPress Tailwind Social Share
<div class="social-share">
<ul class="flex list-none p-0 m-0 space-x-5">
<li>
<!-- Sharingbutton Facebook -->
<a class="block" href="https://facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" target="_blank" rel="noopener" aria-label="">
<div aria-hidden="true" class="">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.77 7.46H14.5v-1.9c0-.9.6-1.1 1-1.1h3V.5h-4.33C10.24.5 9.5 3.44 9.5 5.32v2.15h-3v4h3v12h5v-12h3.85l.42-4z"/></svg>
</div>
</a>
</li>
@ulziibat-n
ulziibat-n / guide.md
Created Mar 19, 2020 — forked from PJoy/guide.md
SAGE BARBA
View guide.md

Using barba.js with Sage starter theme

Barba.js is a library using pushState and AJAX allowing websites to load pages asynchronously while still maintaining browser states and history.

Combining it with some JavaScript animations libraries can help craft some memorable browsing experiences.

alt text source

In this guide, we will try to find an optimal way to integrate Barba with our beloved Sage theme !

View yoastseo-remove-breadcrumb-link.php
View yoastseo-add-breadcrumb-link.php
@ulziibat-n
ulziibat-n / elementor-category-posts-per-page.php
Created Sep 10, 2019 — forked from nicomollet/elementor-category-posts-per-page.php
Elementor: Force posts per page number for posts widget on Category Pages
View elementor-category-posts-per-page.php
<?php
/**
* Elementor: Force posts per page number for posts widget on Category Pages
*
* @param $query
*/
function elementor_category_posts_per_page( $query ) {
$category_id_or_slug = 'myslug';
@ulziibat-n
ulziibat-n / elementorcssinhead.php
Created Sep 10, 2019 — forked from nicomollet/elementorcssinhead.php
Load Elementor styles on all pages in the head to avoid CSS files being loaded in the footer
View elementorcssinhead.php
<?php
/**
* Load Elementor styles on all pages in the head to avoid CSS files being loaded in the footer
*/
function elementor_css_in_head(){
if(class_exists('\Elementor\Plugin')){
$elementor = \Elementor\Plugin::instance();
$elementor->frontend->enqueue_styles();
}
if(class_exists('\ElementorPro\Plugin')){