Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Done thanks

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    I feel like I’m being dim because this should just work right out the box yes?

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Nope nothing in 2020 either. I feel like I being really dim. I don’t have custom taxonomies. I just set up a new custom post type (Teams) I added posts to this area of the site and assigned them to categories. U7,U8 etc. I used the existing category taxonomy which was default with a new custom post type. THere are posts in each category. The post itself displays fine, but when I click on the category name in the meta I just get the NOTHING FOUND message where there should be a list of 2 or 3 teams.

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    It strikes me the URL is wrong. My URL is https://bollingtonunited.co.uk/category/u7/

    When I have a different pre installed post type like projects the cat link is

    https://bollingtonunited.co.uk/project_category/test-cat/
    so shouldn’t my category link be

    https://bollingtonunited.co.uk/team_category/U7?

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Hi I thought of this so I deactivated the theme and tried without DIVI using twenty twenty-two and the problem persists. I still can’t get the category results to display even without divi activated as the theme.

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Hi thanks for the reply yes I have read this post. I tried both pieces of code individually. I used the second piece of code and replaced the array (I also tried the first piece of code still nothing) using DIVI theme if that help?

    function my_cptui_add_post_types_to_archives( $query ) {
    	// We do not want unintended consequences.
    	if ( is_admin() || ! $query->is_main_query() ) {
    		return;    
    	}
    
    	if ( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    
    		// Replace these slugs with the post types you want to include.
    		$cptui_post_types = array( 'team' );
    
    		$query->set(
    	  		'post_type',
    			array_merge(
    				array( 'post' ),
    				$cptui_post_types
    			)
    		);
    	}
    }
    add_filter( 'pre_get_posts', 'my_cptui_add_post_types_to_archives' );

    ‘team’ is my post type slug and also the tem that appears when I roll over the new custom post type in the backend so I’m fairly sure that’s right. Below is the code I have in my function.php to register the new post type (copied from the Custom POst Type plugin) But I still get the NO RESULTS FOUND when I go to the category page

    function cptui_register_my_cpts() {
    
    	/**
    	 * Post Type: Teams.
    	 */
    
    	$labels = [
    		"name" => esc_html__( "Teams", "custom-post-type-ui" ),
    		"singular_name" => esc_html__( "Team", "custom-post-type-ui" ),
    		"menu_name" => esc_html__( "BU Teams", "custom-post-type-ui" ),
    		"all_items" => esc_html__( "All Teams", "custom-post-type-ui" ),
    		"add_new_item" => esc_html__( "Add New Team", "custom-post-type-ui" ),
    		"edit_item" => esc_html__( "Edit Team", "custom-post-type-ui" ),
    		"new_item" => esc_html__( "New Team", "custom-post-type-ui" ),
    		"view_item" => esc_html__( "View Team", "custom-post-type-ui" ),
    		"view_items" => esc_html__( "View Teams", "custom-post-type-ui" ),
    		"search_items" => esc_html__( "Search Teams", "custom-post-type-ui" ),
    		"not_found" => esc_html__( "No Teams Found", "custom-post-type-ui" ),
    	];
    
    	$args = [
    		"label" => esc_html__( "Teams", "custom-post-type-ui" ),
    		"labels" => $labels,
    		"description" => "This is the post type for each team",
    		"public" => true,
    		"publicly_queryable" => true,
    		"show_ui" => true,
    		"show_in_rest" => true,
    		"rest_base" => "",
    		"rest_controller_class" => "WP_REST_Posts_Controller",
    		"rest_namespace" => "wp/v2",
    		"has_archive" => true,
    		"show_in_menu" => true,
    		"show_in_nav_menus" => true,
    		"delete_with_user" => false,
    		"exclude_from_search" => false,
    		"capability_type" => "post",
    		"map_meta_cap" => true,
    		"hierarchical" => false,
    		"can_export" => false,
    		"rewrite" => [ "slug" => "team", "with_front" => true ],
    		"query_var" => true,
    		"supports" => [ "title", "editor", "thumbnail", "excerpt", "custom-fields", "revisions", "author" ],
    		"taxonomies" => [ "category", "layout_tag" ],
    		"show_in_graphql" => false,
    	];
    
    	register_post_type( "team", $args );
    }
    
    add_action( 'init', 'cptui_register_my_cpts' );
    
    
    
    
    
    function cptui_register_my_cpts_team() {
    
    	/**
    	 * Post Type: Teams.
    	 */
    
    	$labels = [
    		"name" => esc_html__( "Teams", "custom-post-type-ui" ),
    		"singular_name" => esc_html__( "Team", "custom-post-type-ui" ),
    		"menu_name" => esc_html__( "BU Teams", "custom-post-type-ui" ),
    		"all_items" => esc_html__( "All Teams", "custom-post-type-ui" ),
    		"add_new_item" => esc_html__( "Add New Team", "custom-post-type-ui" ),
    		"edit_item" => esc_html__( "Edit Team", "custom-post-type-ui" ),
    		"new_item" => esc_html__( "New Team", "custom-post-type-ui" ),
    		"view_item" => esc_html__( "View Team", "custom-post-type-ui" ),
    		"view_items" => esc_html__( "View Teams", "custom-post-type-ui" ),
    		"search_items" => esc_html__( "Search Teams", "custom-post-type-ui" ),
    		"not_found" => esc_html__( "No Teams Found", "custom-post-type-ui" ),
    	];
    
    	$args = [
    		"label" => esc_html__( "Teams", "custom-post-type-ui" ),
    		"labels" => $labels,
    		"description" => "This is the post type for each team",
    		"public" => true,
    		"publicly_queryable" => true,
    		"show_ui" => true,
    		"show_in_rest" => true,
    		"rest_base" => "",
    		"rest_controller_class" => "WP_REST_Posts_Controller",
    		"rest_namespace" => "wp/v2",
    		"has_archive" => true,
    		"show_in_menu" => true,
    		"show_in_nav_menus" => true,
    		"delete_with_user" => false,
    		"exclude_from_search" => false,
    		"capability_type" => "post",
    		"map_meta_cap" => true,
    		"hierarchical" => false,
    		"can_export" => false,
    		"rewrite" => [ "slug" => "team", "with_front" => true ],
    		"query_var" => true,
    		"supports" => [ "title", "editor", "thumbnail", "excerpt", "custom-fields", "revisions", "author" ],
    		"taxonomies" => [ "category", "layout_tag" ],
    		"show_in_graphql" => false,
    	];
    
    	register_post_type( "team", $args );
    }
    
    add_action( 'init', 'cptui_register_my_cpts_team' );
    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Any news on the update please

    Any news of this update please.

    Yep me too exactly this problem

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Fixed I had to specify a width around the whole div, otherwise for some reason it didn’t default to 100% as they do in web browsers? Who would know.

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Hi

    No I’m not doing anything for handheld devices, I assumed (wrongly) that the page would simply shrink to fit the device screen which is what it does on an iPad.
    I don’t want the layout to be any different on an iPhone just a mini version of the full size thing.

    We have cleared the cache. And updated the OS

    ??

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Thanks all. I’m guessing it’s a cache issue with the guys phone ?? Bit of an odd cache issue though. But going to ignore as have tested on several other iPhones and no issues.

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Hi

    Hum thanks for the feedback I’ll see what I can do. Can you let me know when 2.2.0 might be hitting our screens.

    Cheers, Helen

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    Ohhh with a bit jiggling I think I get it now just to weave that into wordpress.
    Thank you sooooo much.

    Thread Starter pepperstreetuk

    (@pepperstreetuk)

    I a so sorry but I’m simply struggling with this. Not a developer by nature. Have set up a simple test … or not as the case might be …
    https://www.pepperstreet.co.uk/pitchandco/test.html

    I am completely lost as to what is calling what where and why? What is your (‘secondlogo’) I also assumed that #menu-site .menu-item-21 a would be the call to my ul li a no?

    Oh dear perhaps I should stick to designing ??

Viewing 15 replies - 1 through 15 (of 18 total)