Skip to content

Instantly share code, notes, and snippets.

View jmslbam's full-sized avatar
💭
Available for (WordPress) work

Jaime Martínez jmslbam

💭
Available for (WordPress) work
View GitHub Profile
@jmslbam
jmslbam / elasticpress_posttype_weighting.php
Created December 2, 2020 16:40 — forked from CatEntangler/elasticpress_posttype_weighting.php
weighting by post_type using ElasticPress
function SetSearchArgs( $formattedArgs, $args = [] ) {
if( isset( $args[ 'post_type' ] ) && ( count( $args[ 'post_type' ] ) > 1 || gettype( $args[ 'post_type' ] ) === 'string' ) ) {
if( gettype( $args[ 'post_type' ] ) === 'array' ) {
$existing_query = $formattedArgs[ 'query' ];
unset( $formattedArgs[ 'query' ] );
@jmslbam
jmslbam / mlp_navigation_with_login.php
Last active February 11, 2016 12:45 — forked from thefuxia/mlp_navigation_with_login.php
function mlp_navigation_with_login()
<?php
// copy from here
/**
* Create a navigation like: DE | EN | RU | Log in
*
* @return string
*/
function mlp_navigation_with_login()