robheath
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Networking WordPress
In reply to: get_template_directory_uri() issues with sub-directory themeThanks, @webmaestro.Fr – That worked for me!!!!!!
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Custom Post Type IssueOk, I changed it to the following:
function my_connection_types() { // Make sure the Posts 2 Posts plugin is active. if ( !function_exists( 'p2p_register_connection_type' ) ) return; p2p_register_connection_type( array( 'name' => 'movietrailers_to_moviehubs', 'from' => 'movietrailers', 'to' => 'moviehubs' ) ); } add_action( 'wp_loaded', 'my_connection_types' ); ?>
But it still comes up as
“Movie Trailer_to_Movie Hub Posts ? Posts (Connected Posts)”
Hmmmm
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Custom Post Type IssueI tried ‘movie_trailer_to_movie_hub’ too.
Here is my functions code for post type (just for movie trailers)
// registration code for movietrailers post type function register_movietrailers_posttype() { $labels = array( 'name' => _x( 'Movie Trailers', 'post type general name' ), 'singular_name' => _x( 'Movie Trailer', 'post type singular name' ), 'add_new' => _x( 'Add New', 'Movie Trailer'), 'add_new_item' => __( 'Add New Movie Trailer '), 'edit_item' => __( 'Edit Movie Trailer '), 'new_item' => __( 'New Movie Trailer '), 'view_item' => __( 'View Movie Trailer '), 'search_items' => __( 'Search Movie Trailers '), 'not_found' => __( 'No Movie Trailer found' ), 'not_found_in_trash'=> __( 'No Movie Trailers found in Trash' ), 'parent_item_colon' => '' ); $taxonomies = array(); $supports = array('title','editor','author','thumbnail','excerpt','custom-fields','comments','revisions'); $post_type_args = array( 'labels' => $labels, 'singular_label' => __('Movie Trailer'), 'public' => true, 'show_ui' => true, 'publicly_queryable'=> true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'rewrite' => array('slug' => 'movie_trailer', 'with_front' => false ), 'supports' => $supports, 'menu_position' => 5, 'menu_icon' => 'https://trailernerd.com/gurus/wp-content/uploads/2012/07/movies1.jpg', 'taxonomies' => $taxonomies ); register_post_type('movietrailers',$post_type_args); }
I also tried using “movie_trailer” and “movie_hub”
I used the following
function my_connection_types() { // Make sure the Posts 2 Posts plugin is active. if ( !function_exists( 'p2p_register_connection_type' ) ) return; p2p_register_connection_type( array( 'name' => 'Movie Trailer_to_Movie Hub', 'from' => 'Movie Trailer', 'to' => 'Movie Hub' ) ); } add_action( 'wp_loaded', 'my_connection_types' );
But it stills show up as the following:
“Posts ? Posts (Connected Posts)”
The box doesn’t appear in my custom post type editor pages. But still shows up in the default post type editor. What am I doing wrong?
My post types exist, I registered them in the functions file.
Thanks for your help.
Viewing 6 replies - 1 through 6 (of 6 total)