SFTP define in wp-config.php

Do you mean SFTP or FTPS? For SFTP you need to enable libssh2-php on your server and link it to your PHP and restart your ssh, you can get the downloads here http://www.libssh2.org/ Once you install that you should automatically see SFTP/SSH option in your admin under “Connection”, though I believe there was some recent … Read more

Using global $post; with custom post types

How about this? (Add to your theme’s functions.php file, or to a plugin.) function new_post_alert() { global $post; $ageunix = get_the_time( ‘U’ ); $days_old_in_seconds = time() – $ageunix; $days_old = $days_old_in_seconds / 86400; $post_type = get_post_type(); if ( ( $days_old < 3 ) && ( ‘news’ === $post_type ) ) { ?> <script type=”text/javascript”> jQuery(document).ready(function($){ … Read more