Skip to content

Instantly share code, notes, and snippets.

View saidMounaim's full-sized avatar
:octocat:

Said Mounaim saidMounaim

:octocat:
View GitHub Profile
@rhcarlosweb
rhcarlosweb / owlcarousel2thumbs.js
Last active February 18, 2021 15:26
Owl Carousel 2 Sync Two Sliders
var sync1 = $('#sync1'),
sync2 = $('#sync2'),
duration = 300,
thumbs = 4;
// Sync nav
sync1.on('click', '.owl-next', function () {
sync2.trigger('next.owl.carousel')
});
sync1.on('click', '.owl-prev', function () {
@tsongas
tsongas / redux-devtools-thunk.js
Created March 11, 2017 02:49
How to use Redux DevTools with Redux Thunk
import { createStore, applyMiddleware } from 'redux';
import reduxThunk from 'redux-thunk';
import reducers from './reducers';
const store = createStore(reducers,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
applyMiddleware(reduxThunk));
@mattclements
mattclements / function.php
Last active July 2, 2024 15:32
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@kevinwhoffman
kevinwhoffman / loop-custom.php
Last active July 17, 2024 14:47
WordPress - Custom Post Type Loop
<?php
$loop = new WP_Query( array(
'post_type' => 'Property',
'posts_per_page' => -1
)
);
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>