Skip to main content

I'm working on a website with a portfolio section, and I'm almost i finished with this section, but iI have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and iI can't change it.

takingTaking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I have created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

UPDATE

my Custom Post args:

$args = array(
    'labels' => $labels,
    'public' => true,
    'menu_icon'=> 'dashicons-groups',
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'portfolio', 'with_front' => true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'exclude_from_search' => true,
    'supports' => array('title', 'excerpt', 'page-attributes')
); 

    register_post_type( 'port', $args );

iI hope i didn'tI haven't missed anything.

I'm working on a website with a portfolio section, and almost i finished this section but i have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and i can't change it.

taking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

UPDATE

my Custom Post args:

$args = array(
    'labels' => $labels,
    'public' => true,
    'menu_icon'=> 'dashicons-groups',
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'portfolio', 'with_front' => true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'exclude_from_search' => true,
    'supports' => array('title', 'excerpt', 'page-attributes')
);

i hope i didn't missed anything.

I'm working on a website with a portfolio section, and I'm almost finished with this section, but I have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and I can't change it.

Taking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I have created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

UPDATE

my Custom Post args:

$args = array(
    'labels' => $labels,
    'public' => true,
    'menu_icon'=> 'dashicons-groups',
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'portfolio', 'with_front' => true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'exclude_from_search' => true,
    'supports' => array('title', 'excerpt', 'page-attributes')
); 

    register_post_type( 'port', $args );

I hope I haven't missed anything.

Update
Source Link

I'm working on a website with a portfolio section, and almost i finished this section but i have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and i can't change it.

taking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

UPDATE

my Custom Post args:

$args = array(
    'labels' => $labels,
    'public' => true,
    'menu_icon'=> 'dashicons-groups',
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'portfolio', 'with_front' => true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'exclude_from_search' => true,
    'supports' => array('title', 'excerpt', 'page-attributes')
);

i hope i didn't missed anything.

I'm working on a website with a portfolio section, and almost i finished this section but i have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and i can't change it.

taking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

i hope i didn't missed anything.

I'm working on a website with a portfolio section, and almost i finished this section but i have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and i can't change it.

taking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

UPDATE

my Custom Post args:

$args = array(
    'labels' => $labels,
    'public' => true,
    'menu_icon'=> 'dashicons-groups',
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug' => 'portfolio', 'with_front' => true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'exclude_from_search' => true,
    'supports' => array('title', 'excerpt', 'page-attributes')
);

i hope i didn't missed anything.

Source Link

Problem with single-page for my custom post

I'm working on a website with a portfolio section, and almost i finished this section but i have a problem with the single page which is :

  • whenever i click on any portfolio link, the single page opens but not showing any details except the previous and next link and this works correct.
  • Also it uses the single.php and i can't change it.

taking in consideration my main post link is (our-portfolio) and the custom post (slug = portfolio).

I tried this step:

  • I created a new single page with name (single-portfolio.php) and put it in the same place where my ( single.php) is but not working.

i hope i didn't missed anything.