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(document).ready(function($) { | |
const offset = 0, // change offset (px) | |
scrollTime = 300; // change scrolling animation time (ms) | |
$('a[href*="#"]').not('[href="#"]').not('[href="#0"]').not('[href*="replytocom"]').click(function (t) { | |
if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) { | |
var e = $(this.hash); | |
(e = e.length ? e : $("[name=" + this.hash.slice(1) + "]")).length && (t.preventDefault(), $("html, body").animate({ scrollTop: e.offset().top - offset }, scrollTime)); | |
} |
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
<?php | |
/* | |
* Put following code BEFORE running the query (WP loop, Oxygen's repeater, etc.) | |
* What it does: | |
* - updates query with right page number variable to display the correct page | |
* - assigns the query to wp_query so that pagination links work | |
*/ | |
function handle_pagination_on_frontpage( $query ) { |
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
/* I'll put here different examples of dynamic query for Oxygen repeater : | |
* - Use one of the following repeater_dynamic_query definitions | |
* in code block just BEFORE the repeater | |
* - Set the repeater custom query settings : post type, number of posts, order... | |
* - Add the remove_action in a code block AFTER the repeater | |
*/ | |
/**************************************************************************************************** | |
* Display related posts for any CPT with taxonomy: |