Skip to content

Instantly share code, notes, and snippets.

César Ribeiro chrdesigner

View GitHub Profile
@chrdesigner
chrdesigner / filter-external.js
Created Sep 17, 2018
Sub Menu + Filter TAG ~ External
View filter-external.js
$('.filterBlog a').on('click', function(e) {
filterBlogHash(this.hash, e);
});
$(window).on('load',function() {
filterBlogHash(window.location.hash);
});
function filterBlogHash(hash, e) {
if(hash === '') {
@chrdesigner
chrdesigner / filter.js
Created Sep 17, 2018
Sub Menu + Filter TAG ~ Simple
View filter.js
$('.filterBlog').on('click', 'a', function(e){
e.preventDefault();
var hash = $(this).attr('href').replace(/^.*?(#|$)/,'');
$('.filter a.type').each(function (index, value) {
// console.log('filter' + index + ':' + $(this).attr('id'));
@chrdesigner
chrdesigner / functions.php
Last active Nov 9, 2017
Function to create a custom related post list by tag and category
View functions.php
<?php
/**
* Related Posts.
*
* Usage:
* To show related by categories:
* Add in single.php <?php chr_related_posts(); ?>
* To show related by tags:
* Add in single.php <?php chr_related_posts( 'tag' ); ?>
*
@chrdesigner
chrdesigner / 00-README.md
Last active Jun 14, 2017
Git List - Post views Count
@chrdesigner
chrdesigner / 00-README.md
Created Feb 16, 2017
Git List - Exibir ou Ocultar a sua senha com jQuery
View 00-README.md
@chrdesigner
chrdesigner / 00-README.md
Last active Nov 4, 2016
Git List - Executar um vídeo a partir de um click na thumbnail
View 00-README.md
@chrdesigner
chrdesigner / update_row_colours.js
Created Sep 25, 2016
Aplica verificação de cor na tabela se a data é maior ou não, dentro do field repeater ACF
View update_row_colours.js
jQuery(document).ready(function($) {
var update_row_colours = function() {
$('[data-name="adicionar_experiencias"] .acf-table .acf-row').each( function() {
var strat = $( this ).find('[data-name="iniciou_no_dia"] input.input-alt');
var end = $( this ).find('[data-name="terminou_no_dia"] input.input-alt');
var strat_date = new Date( strat.val() );
@chrdesigner
chrdesigner / README.md
Last active Apr 15, 2016
Borda Serrilhada Somente com CSS 3
View README.md
View README.md

Formulário de Departamentos com Suporte de Option Group

Contact Form 7 + Option Group

Criação de um formulário via Contact Form 7 com select personalizado com Option Group para seleção de departamentos.

Download do Contact Form 7

@chrdesigner
chrdesigner / functions.php
Last active Feb 17, 2016
List All Categories and Subcategories and return the last post register
View functions.php
<?php
/**
* Returns ID of top-level parent category, or current category if you are viewing a top-level
*
* @param string $catid Category ID to be checked
* @return string $catParent ID of top-level parent category
*/
function smart_category_top_parent_id ($catid) {
while ($catid) {
$cat = get_category($catid); // get the object for the catid
You can’t perform that action at this time.