PhillShaw
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Add category to a custom post type?aside from the above issue I am also having issues with showing that an author/editor/contributor (etc) has created any custom post type when you click the author name.
At present when you click the author name it only shows posts from regular post types. I imagine thats because my ‘review’ section doesn’t have the author box in available in the screen options. Can I make this happen?
see screenshot
Forum: Fixing WordPress
In reply to: Add category to a custom post type?Thanks for the help, I now get this error at the top of my site:
I have implemented it, but I am still not seeing the results being passed to the archive pages. I have a review that tagged that should show in the “News” archive.
Can you explain what
$post_type = array('post','review');
relates to in cpt.php so I understand how each links?thanks.
Forum: Fixing WordPress
In reply to: Add category to a custom post type?Ok, my mistake,
This code is from single.php which is where we right normal blog posts in the backend, these are showing categories properly.
(the website is https://www.phillshaw.co.uk/babylongeek/)
Forum: Fixing WordPress
In reply to: Add category to a custom post type?ok thanks,
here is the full cpt.php code:
https://pastebin.com/Fmr3x9F8Forum: Fixing WordPress
In reply to: Add category to a custom post type?Ok thanks for that, it makes sense in that I need to call those categories but the code makes no sense to me!
Any ideas on how to make this function for my situation? (sorry to keep leeching your time!)
Forum: Fixing WordPress
In reply to: Add category to a custom post type?I spoke too soon!
I now have access to the categories from within custom post type but on the frontend of the site it doesnt look like they’re being filtered through, I have added ‘Movie News’ as a category within my review (custom post type) but when I click movie news on my site it isnt there??Forum: Fixing WordPress
In reply to: Add category to a custom post type?at stvwlf, That solved it! Much appreciated for your efforts!!
Thanks guys.
Forum: Fixing WordPress
In reply to: Add category to a custom post type?Sorry my mistake in the first post, its not single-review.php its cpt.php where the code you suggested lives.
Yes when I take out
'taxonomies' => array('category')
the site returns to normal.Forum: Fixing WordPress
In reply to: Add category to a custom post type?ok I made the changes and:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /websites/123reg/LinuxPackage21/ph/il/ls/phillshaw.co.uk/public_html/babylongeek/wp-content/themes/Valor/cpt.php on line 35
Forum: Fixing WordPress
In reply to: Add category to a custom post type?where would I add that?
in the single-review.php (which is the cutom post type) my code is:// Review Post type add_action('init', 'review_register'); function review_register() { $labels = array( 'name' => _x('Reviews', 'post type general name'), 'singular_name' => _x('Review', 'post type singular name'), 'add_new' => _x('Add New', 'review'), 'add_new_item' => __('Add New Review'), 'edit_item' => __('Edit Review'), 'new_item' => __('New Review'), 'view_item' => __('View Review'), 'search_items' => __('Search Review'), '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' => null, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title','editor','thumbnail') ); register_post_type( 'review' , $args ); } // Custom Taxonomy function add_console_taxonomies() { register_taxonomy('console', 'review', array( // Hierarchical taxonomy (like categories) 'hierarchical' => true, // This array of options controls the labels displayed in the WordPress Admin UI 'labels' => array( 'name' => _x( 'Review Category', 'taxonomy general name' ), 'singular_name' => _x( 'Review-Category', 'taxonomy singular name' ), 'search_items' => __( 'Search Review-Categories' ), 'all_items' => __( 'All Review-Categories' ), 'parent_item' => __( 'Parent Review-Category' ), 'parent_item_colon' => __( 'Parent Review-Category:' ), 'edit_item' => __( 'Edit Review-Category' ), 'update_item' => __( 'Update Review-Category' ), 'add_new_item' => __( 'Add New Review-Category' ), 'new_item_name' => __( 'New Review-Category Name' ), 'menu_name' => __( 'Review Categories' ), ), // Control the slugs used for this taxonomy 'rewrite' => array( 'slug' => 'console', // This controls the base slug that will display before each term 'with_front' => false, // Don't display the category base before "/locations/" 'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/" ), )); } add_action( 'init', 'add_console_taxonomies', 0 ); ?>
Forum: Fixing WordPress
In reply to: Tags not working!!Hi,
Thanks for the comment, but https://www.phillshaw.co.uk/home/category/reviews/ is only showing 1 post which isn’t created using the plugin above. ??Forum: Fixing WordPress
In reply to: face book likes on blog not linking to facebook pageResolved
Forum: Fixing WordPress
In reply to: face book likes on blog not linking to facebook pagethat should be
webboss[a]phillshaw.co.uk
Forum: Fixing WordPress
In reply to: face book likes on blog not linking to facebook pagecan you email me at web boss[a]phillshaw.co.uk and i’ll email you screenshots etc?!
Forum: Fixing WordPress
In reply to: face book likes on blog not linking to facebook pageOk hang on