How to Add Single.php and Index.php to Child Theme Icon Stack

Hi!

Before I make adjustments… I must ask is there pagination by default in Icon stack for single posts and archives page? If not, I need to add some via the child theme. I used this code provided by your staff to add a header and footer file to the child theme. I have already created a legacy and cranium folder.

So, should I now only create a single.php and index.php file and add them directly to the cranium folder or create two separate folders with one named single.php and one named index.php and then add new files to those new folders under the same name?

Are there also ARCHIVE, and CATEGORY templates within Icon? If so, what are the files by name?
Will I be using the same method below to achieve this?

Blockquote /public_html/shopatkei.com/wp-content/themes/x-child/framework/legacy/cranium/footers/views/icon/wp-footer.php

Hello There,

Thank you for the very detailed post information.

1.) Pagination is present in Icon stack. You can find it in the blog index and archive pages such as category, date, tags, author, etc.

For single posts, Icon stack has the next and previous post navigation as well. You can check it here: http://prntscr.com/gcuk0h
http://demo.theme.co/icon-1/affiliate-marketing-101-self-hosted-video/

2.) X has index.php and single.php file which has been broken down into small parts to accommodate the different stack designs. It doesn’t have archive.php and category.php because it only relies on the index.php which is the fallback of the archive page template files. To better understand the template hierarchy in WordPress, please check out this codex: https://developer.wordpress.org/themes/basics/template-hierarchy/

Hope this helps.

Hi, RueNel!

In the screenshot, I do see the next post arrows on the single posts page. However, they only appear if breadcrumbs are enabled for the entire website which I do not want. With the code below, I can remove both the breadcrumb ( .x-breadcrumbs) and bread crumb wrap (x-breadcrumb-wrap) from specific pages.
How could I combine the code to include multiple pages in efforts to have breadcrumbs removed on every page except single posts? I do understand that in order for the breadcrumbs to appear on single posts they need to appear on the main post page first so that is fine.

For example exclude breadcrumbs from page 234, 550, and 1010…
As for the pagination perhaps it will appear after I have created so many posts. Thank you.

Blockquote .page-id-234 .x-breadcrumb-wrap {
display: none;
}

Hello There,

Do you only need next/previous navigation for your single posts? If that is the case, then you can make use of this code in your child theme’s functions.php file

// The next and previous post navigation
// =============================================================================
function add_entry_navigation(){
  if( is_single() ) {
    x_entry_navigation();
  }
}
add_action('x_after_view_global__content-the-content', 'add_entry_navigation' );
// =============================================================================

Please let us know if this works out for you.

Hi, Ruenel!

Thanks for the code it works, but the news and single posts pages look a lot better with the arrows and title which are a result of using the bread crumbs on on those particular pages. I just need to know how to add multiple page id to a single css code. Here’s the code I’m using and it works for removing the breadcrumnbs, but I have to repeat it for every single page. Thanks for your help.

.page-id-232 .x-breadcrumb-wrap {
display: none;
}

Hey There,

.page-id-232 .x-breadcrumb-wrap {
   display: none;
}

This code will only target the page with an ID of 232. If you want to display the breadcrumb wrap in all single posts, you can update that code and make use of this one:

.page-id-232 .x-breadcrumb-wrap,
.single-post .x-breadcrumb-wrap {
   display: none;
}

The code above is using .single-post to refer to all single posts. If you want to target specific post, you use this .postid-{123}:

.page-id-232 .x-breadcrumb-wrap,
.postid-123 .x-breadcrumb-wrap,
.single-post .x-breadcrumb-wrap {
   display: none;
}


If you want to add other page or post but do not know where to get the ID, please check out this article: https://theme.co/apex/forum/t/setup-how-to-locate-post-ids/59

Hope this helps. Please let us know how it goes.

Hi, Ruenel!

I have all of the page numbers. Will the code above leave the breadcrumbs on the main posts and single posts pages, but remove them from every other page on the website? That’s what I’m going for… they are fine for the posts and single posts pages.

Hi There,

If you only want to remove the breadcrumbs on pages, then use the .page .x-breadcrumb-wrap selector. Yup this selector exclude the Blog page (main posts) and Single post pages.

Thanks,

1 Like