Skip to content

Instantly share code, notes, and snippets.

Francisco arenas dospuntocero

Block or report user

Report or block dospuntocero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dospuntocero
dospuntocero / complex query
Last active Jun 13, 2019
i have a product with 2 taxonomies and i need to filter the ones that belongs to one specific taxonomy and at the same time, order the objects by category
View complex query
<?php
/**
* Template Name: Product
*/
get_header();
?>
<main class="wrapper">
@dospuntocero
dospuntocero / get_template_part_extra()
Last active Jun 12, 2019
wordpress get_template_part_extra() lets you pass an array of variables to the template
View get_template_part_extra()
<?php //called like this on other template get_template_part_extra('templates/products_accordion',[ 'key'=>'protection'] ); ?>
//inside the partial...
<h2>
<?php echo( $template_args['key'] ); ?>
</h2>
View “People You May Know.” “Suggested Friends.” “Suggestions for you.”
a = setInterval(function () {
window.scrollTo(0,document.body.scrollHeight);
$("button.bt-request-buffed[data-act='request']").click();
}, 3000);
@dospuntocero
dospuntocero / How to create a Custom Post type template that uses a divi layout directly
Last active May 31, 2019
How to create a Custom Post type template that uses a divi layout directly
View How to create a Custom Post type template that uses a divi layout directly
## first in your functions.php add the following:
```
//Shortcode to show the module
function showmodule_shortcode($moduleid) {
extract( shortcode_atts( array('id' =>'*'), $moduleid ) );
return do_shortcode('[et_pb_section global_module="'.$id.'"][/et_pb_section]');
}
add_shortcode('showmodule', 'showmodule_shortcode');
```
## then create your single-customCPT.php file duplicating page.php from divi and look for line 45 :
@dospuntocero
dospuntocero / How to switch to a different remote branch in git Ask Question
Last active May 31, 2019
How to switch to a different remote branch in git Ask Question
View How to switch to a different remote branch in git Ask Question
first, just input following command in the terminal:
git branch --all
And then you will see the all the branches on local and remote. Something like this:
*master
remotes/origin/develop
remotes/origin/master
remotes/origin/web
remotes/origin/app
@dospuntocero
dospuntocero / use MAMPs php instead of system's
Last active May 31, 2019
use MAMPs php instead of system's
View use MAMPs php instead of system's
#first open the profile
mate ~/.bash_profile
- then add this 2 lines
PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`
export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH
- after that if you call which php, it must say something like
/Applications/MAMP/bin/php/php7.1.12/bin/php
@dospuntocero
dospuntocero / KNK C3 installation guide on macos using terminal:
Last active May 31, 2019
KNK C3 installation guide on macos using terminal:
View KNK C3 installation guide on macos using terminal:
there is a ultra faster way with less sotfware involved for macos
1st: diskutil list
2nd: diskutil unmountDisk /dev/diskn
3rd: sudo dd bs=1m if=the_force_image of=/dev/rdiskn
thats it. no other software needed.
View create symlinks
@dospuntocero
dospuntocero / svg separator
Last active May 31, 2019
svg separator - in case you need to modify the vector you need to decode the base 64 object - https://www.tools4noobs.com/online_php_functions/base64_encode/
View svg separator
<div class="separator" style="
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSI4OXB4IiB2aWV3Qm94PSIwIDAgMTI4MCAxNDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2Y2ZjdmOCI+PHBhdGggZD0iTTcyNS4yOSAxMDEuMkMzMjUuMjIgMTIyLjQ4IDAgMCAwIDB2MTQwaDEyODBWMHMtMTU0LjY0IDc5LjkyLTU1NC43MSAxMDEuMnoiIGZpbGwtb3BhY2l0eT0iLjMiLz48cGF0aCBkPSJNNTU2LjQ1IDExOS43NEM5NTMuNDEgMTQwIDEyODAgMTQgMTI4MCAxNHYxMjZIMFYwczE1OS41IDk5LjQ4IDU1Ni40NSAxMTkuNzR6IiBmaWxsLW9wYWNpdHk9Ii41Ii8+PHBhdGggZD0iTTY0MCAxNDBjMzUzLjQ2IDAgNjQwLTE0MCA2NDAtMTQwdjE0MEgwVjBzMjg2LjU0IDE0MCA2NDAgMTQweiIvPjwvZz48L3N2Zz4=);
height: 88px;
"></div>
@dospuntocero
dospuntocero / show page children wordpress
Last active May 31, 2019
show page children wordpress
View show page children wordpress
<?php
$args = array(
'post_type' => 'page',
'posts_per_page' => -1,
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'menu_order'
);
You can’t perform that action at this time.