Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Wow, you’ve opened up a whole new world for me. I was unable to get it to work right away, but now I have the tools to figure it out.

    Thanks for your help!

    I’ll repost when I put it all together…

    I appreciate your quick response and help!

    I’ve made the changes you’ve suggested (I think).

    I duplicated the functions.php file located in wp-content/themes/mytheme/ and placed it at wpbook/theme/functions.php

    I changed the OR to an AND as you suggested as well.

    I don’t notice any change on my Facebook apps page? It’s still not showing any of my video posts.

    I also added the ‘gallery’ type.

    if((get_post_type($my_post->ID) != 'post') && (get_post_type($my_post->ID) != 'video') && (get_post_type($my_post->ID) != 'gallery'))){ // only do this for posts
          return;
        }

    I’ve been up all night trying to figure this one out. I was hoping it was something stupid I was overlooking…

    I’m having some issues with this…

    I used a theme for my site which involves using what I believe to be custom post types. I found this thread and thought for sure it was the answer to all my problems. I’ve been fiddling with it for hours now with no luck. I used the first snippet from BandonRandon as follows:

    if((get_post_type($my_post->ID) != 'post') || (get_post_type($my_post->ID) != 'video')){ // only do this for posts
          return;
        }

    I’m pretty new to .php, so I will paste in the code from the functions.php from the theme I am using. I’m assuming I’m missing something here?

    add_action('init', 'gallery_register');
    
    function gallery_register() {
    
    	$labels = array(
    		'name' => _x('Image gallery', 'post type general name'),
    		'singular_name' => _x('Gallery Item', 'post type singular name'),
    		'add_new' => _x('Add New', 'gallery item'),
    		'add_new_item' => __('Add New gallery Item'),
    		'edit_item' => __('Edit gallery Item'),
    		'new_item' => __('New gallery Item'),
    		'view_item' => __('View Gallery Item'),
    		'search_items' => __('Search gallery'),
    		'not_found' =>  __('Nothing found'),
    		'not_found_in_trash' => __('Nothing found in Trash'),
    		'parent_item_colon' => ''
    	);
    
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'publicly_queryable' => true,
    		'show_ui' => true,
    		'query_var' => true,
    		'menu_icon' => get_stylesheet_directory_uri() . '/images/mbewizz.png',
    		'rewrite' => true,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'menu_position' => null,
    		'supports' => array('title','editor','thumbnail')
    	  ); 
    
    	register_post_type( 'gallery' , $args );
    }
    add_action('init', 'video_register');
    
    function video_register() {
    
    	$labels = array(
    		'name' => _x('Video Gallery', 'post type general name'),
    		'singular_name' => _x('video Item', 'post type singular name'),
    		'add_new' => _x('Add New', 'video item'),
    		'add_new_item' => __('Add New video Item'),
    		'edit_item' => __('Edit video Item'),
    		'new_item' => __('New video Item'),
    		'view_item' => __('View video Item'),
    		'search_items' => __('Search video'),
    		'not_found' =>  __('Nothing found'),
    		'not_found_in_trash' => __('Nothing found in Trash'),
    		'parent_item_colon' => ''
    	);
    
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'publicly_queryable' => true,
    		'show_ui' => true,
    		'query_var' => true,
    		'menu_icon' => get_stylesheet_directory_uri() . '/images/videowizz.png',
    		'rewrite' => true,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'menu_position' => null,
    		'supports' => array('title','editor','thumbnail','comments')
    	  ); 
    
    	register_post_type( 'video' , $args );
    
    }
    register_taxonomy("Categories", array("video"), array("hierarchical" => true, "label" => "Video Categories", "singular_label" => "Category", "rewrite" => true));
    add_action( 'admin_menu', 'my_page_excerpt_meta_box' );

    Any help with this would be greatly appreciated, for I am stumped…

Viewing 3 replies - 1 through 3 (of 3 total)