I'm using creating a child theme for Woothemes' Canvas.

I'm attempting to use functions.php within the child theme to simply use actions on my small custom publish type.

This code does not appear to become working:

 add_action( 'woo_post_inside_after', 'my_geo_mashup' );
function my_geo_mashup() {
       echo GeoMashup::map();
    if ($post->post_type == 'listings') {
        //My function
       }
}

add_action( 'woo_post_inside_before', 'listings_nivo' );
function listings_nivo() {
echo do_shortcode('[nivo source="current-post" ]');
 if ($post->post_type == 'listings') {
        //My function
       }
}

So, I am unsure ways to get the above mentioned to operate correctly and just show these products around the custom publish type, or just for the custom publish type template single-entries.php (when i only want the map and slider to exhibit around the actual publish, this is not on your blog page (archive.php)

Within your function, try adding global $post;. Then to determine what you're getting with $post->post_type echo it to the screen. As lengthy because this provides you with "entries", your code should work. Otherwise, there's most likely another problem at play.

Instead of making the whole $publish object global, you can easily make $publish_type global rather. Ex below.

I am not quite sure where that function has been loaded, but make certain you hook somewhere inside the publish. When the action is before, so far as I understand and from experience, the publish variable is going to be null.

Just like an evaluation, try running the experience in wordpress_footer Ex. add_action( 'wp_footer', 'listings_nivo' ) Find out if that yeilds any improvements.

if echoing var_dump($publish) continues to be null, well, unsure what to do after that.

So that you can try running the below, then run the experience within the appropriate place whether it works:

function listings_nivo() {
    echo do_shortcode('[nivo source="current-post" ]');
    global $post_type;
        // Diagnostic purposes
    echo var_dump($post_type);
    if ($post_type == 'listings') {
            //My function
    }
}
add_action( 'wp_footer', 'listings_nivo' );

Look at your error log or turn wordpress_debug to true inside your wordpress-config.php file if little else to determine contrary else is happening.

All the best!