Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Forum: Plugins
    In reply to: ACF true/false loop
    Thread Starter ivan76

    (@ivan76)

    Ok, I find what’s the problem but no how solve it. This script only works with the topics of the present year, if I select topics from other years, them aren’t displayed.

    Forum: Plugins
    In reply to: ACF true/false loop
    Thread Starter ivan76

    (@ivan76)

    No it doesn’t work. Someone can help me?

    Forum: Plugins
    In reply to: ACF true/false loop
    Thread Starter ivan76

    (@ivan76)

    Well I try

    if($selected==true)

    and it works

    Thread Starter ivan76

    (@ivan76)

    Ok I resolved the problem adding this lines in functions.php

    //* Link portfolio CPT to categories taxonomy
    add_action( 'init', 'sk_add_category_taxonomy_to_portfolio' );
    function sk_add_category_taxonomy_to_portfolio() {
    	register_taxonomy_for_object_type( 'category', 'portfolio' );
    }
    Thread Starter ivan76

    (@ivan76)

    Unfortunately

    'taxonomies' => array( 'category' ),

    don’t solve the problem

    Thread Starter ivan76

    (@ivan76)

    Well I think i find the problem the category not’s added when i choose it to the Portfolio.

    Thread Starter ivan76

    (@ivan76)

    First i use the “Genesis Portfolio Pro” plugin. The problem is it crop de pictures and one my categories is “Posters”. I don’t want to crop them in the archive-page. So I try to made my own archive-pages. The general archive-page is working fine, the problem is with subcategories.

    Thread Starter ivan76

    (@ivan76)

    Hello Michael Thanks for your help.

    Actually im’m trying to made four differents archive-page thant’s my functions.php. I’m using Genesis framework with mobile_first child theme.

    function create_posttype() {
    
    	register_post_type( 'portfolio',
    	// CPT Options
    		array(
    			'labels' => array(
    				'name' => __( 'portfolio' ),
    				'singular_name' => __( 'portfolio' )
    			),
    			'public' => true,
    			'has_archive' => true,
    			'rewrite' => array('slug' => 'portfolio'),
    		)
    	);
    }
    
    add_action( 'init', 'create_posttype' );
    
    function custom_post_type() {
    
    // Set UI labels for Custom Post Type
    	$labels = array(
    		'name'                => _x( 'portfolio', 'Post Type General Name', 'calduchstudio' ),
    		'singular_name'       => _x( 'portfolio', 'Post Type Singular Name', 'calduchstudio' ),
    		'menu_name'           => __( 'portfolio', 'calduchstudio' ),
    		'parent_item_colon'   => __( 'Parent portfolio', 'calduchstudio' ),
    		'all_items'           => __( 'All portfolio', 'calduchstudio' ),
    		'view_item'           => __( 'View portfolio', 'calduchstudio' ),
    		'add_new_item'        => __( 'Add New portfolio', 'calduchstudio' ),
    		'add_new'             => __( 'Add New', 'calduchstudio' ),
    		'edit_item'           => __( 'Edit portfolio', 'calduchstudio' ),
    		'update_item'         => __( 'Update portfolio', 'calduchstudio' ),
    		'search_items'        => __( 'Search portfolio', 'calduchstudio' ),
    		'not_found'           => __( 'Not Found', 'calduchstudio' ),
    		'not_found_in_trash'  => __( 'Not found in Trash', 'calduchstudio' ),
    	);
    
    // Set other options for Custom Post Type
    
    	$args = array(
    		'label'               => __( 'portfolio', 'calduchstudio' ),
    		'description'         => __( 'portfolio news and reviews', 'calduchstudio' ),
    		'labels'              => $labels,
    		// Features this CPT supports in Post Editor
    		'supports'            => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', ),
    		// You can associate this CPT with a taxonomy or custom taxonomy.
    		'taxonomies'          => array( 'genres' ),
    		/* A hierarchical CPT is like Pages and can have
    		* Parent and child items. A non-hierarchical CPT
    		* is like Posts.
    		*/
    		'hierarchical'        => false,
    		'public'              => true,
    		'show_ui'             => true,
    		'show_in_menu'        => true,
    		'show_in_nav_menus'   => true,
    		'show_in_admin_bar'   => true,
    		'menu_position'       => 5,
    		'can_export'          => true,
    		'has_archive'         => true,
    		'exclude_from_search' => false,
    		'publicly_queryable'  => true,
    		'capability_type'     => 'page',
    	);
    
    	// Registering your Custom Post Type
    	register_post_type( 'portfolio', $args );
    
    }
    Forum: Plugins
    In reply to: is_category archives
    Thread Starter ivan76

    (@ivan76)

    What can I use for display only topics from a category. in_category doesn’t work too.

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