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
# Rake task to copy local files to remote server via FTP | |
# required credentials.yml file, that contains keys: | |
# server, username, password | |
require "net/ftp" | |
require "yaml" | |
class FTPClient | |
attr_reader :remote_path |
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
// add custom post type to wp loop | |
add_filter( 'pre_get_posts', array(&$this, 'add_to_query') ); | |
// ads to query | |
function add_to_query( $query ) { | |
if ( is_admin() || is_preview() ) | |
return; | |
//if ( is_home() || is_front_page() && ( false == $query->query_vars['suppress_filters'] ) ) { |