// jQuery
$(document).ready(function() {
// code
})
This file contains 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
-- | |
-- La ciencia está en: | |
-- | |
-- * Agregar un campo en la tabla de tipo tsvector (1), en este caso se llama tsv, | |
-- podría ponérsele cualquier nombre. | |
-- * Agregar un índice GIN (2) | |
-- * Crear un trigger que cuando se inserte o actualice una tupla se actualice la | |
-- columna tsv (nuestro tsvector) | |
-- | |
-- 1. http://www.postgresql.org/docs/9.1/static/datatype-textsearch.html |
This file contains 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 | |
get_header(); | |
?> | |
<div id="container"> | |
<a name="top"></a> | |
<?php | |
$args = array( | |
'sort_order' => 'ASC', | |
'sort_column' => 'menu_order', //post_title | |
'hierarchical' => 1, |
This file contains 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 | |
#First step: Sync the navigation and each page sections | |
# functions.php | |
class description_walker extends Walker_Nav_Menu{ | |
function start_el(&$output, $item, $depth, $args){ | |
global $wp_query; | |
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; | |
$class_names = $value = ''; | |
$classes = empty( $item->classes ) ? array() : (array) $item->classes; | |
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); |
This file contains 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
/******************************************************************************* | |
1. DEPENDENCIES | |
*******************************************************************************/ | |
var gulp = require('gulp'); // gulp core | |
sass = require('gulp-sass'), // sass compiler | |
uglify = require('gulp-uglify'), // uglifies the js | |
jshint = require('gulp-jshint'), // check if js is ok | |
rename = require("gulp-rename"); // rename files | |
concat = require('gulp-concat'), // concatinate js |
- view/index.blade.php
{{ Form::open(['url' => '/profile', 'method' => 'get']) }}
{{ Form::text('user', null, ['id'=>'users']) }}
{{ Form::submit('GO') }}
{{ Form::close() }}
- routes.php
Route::get('/', 'SearchController@index');
This file contains 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 | |
define('MY_POST_TYPE', 'my'); | |
define('MY_POST_SLUG', 'gallery'); | |
function my_register_post_type () { | |
$args = array ( | |
'label' => 'Gallery', | |
'supports' => array( 'title', 'excerpt' ), | |
'register_meta_box_cb' => 'my_meta_box_cb', |
This file contains 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 | |
// ADDING CUSTOM POST TYPE | |
add_action('init', 'all_custom_post_types'); | |
function all_custom_post_types() { | |
$types = array( | |
// News and Events |
This file contains 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 | |
function cwc_viewpdf($attr, $url) { | |
return '<iframe src="http://docs.google.com/viewer?url=' . $url . '&embedded=true" style="width:' .$attr['width']. '; height:' .$attr['height']. ';" frameborder="0">Your browser should support iFrame to view this PDF document</iframe>'; | |
} | |
add_shortcode('embedpdf', 'cwc_viewpdf'); |
This file contains 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 | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
OlderNewer