Archive template for custom post type

Posted in: Newspaper
Post count: 85

I’m trying to figure out how best to create a custom template for a CPT that I have.

This is what I want it to more or less look like.

http://tinypic.com/r/11942md/5

My CPT is basically just people in our company. Obviously this can be done easily using Visual Composer and create a page. However, I need to be able to create the same design for use as the the archive template for the CPT.

What would be the best way to go about this?

Post count: 3343

Hello,
I’m not sure is that simple to make this custom page. Please make it using Page Builder if is ok for you.

Thanks for understanding.

Post count: 85

Okay so I’ve been able to figure out most of what I want to do without having to use Page Builder. The only issue I have is with pagination displaying an extra blank page. I’m guessing this might be due to the custom WP_Query I’m using to get posts to display from my CPT in the order that I want.

http://pastebin.com/Cd3WfS6g

Is there a way to fix the extra blank?

Post count: 3343

Hello,
I can’t test your code i don’t have custom post type stuff. Do you mean you go to page 2 and is blank? Can you show me a screenshot of you page results.

I try to test you code somehow with a custom post type.

Post count: 85

My Custom Post Type has 16 entries that I am limiting to 10 per page. So that should use only 2 pages.

http://tinypic.com/r/4vih3n/5

http://tinypic.com/r/29usx0x/5

Post count: 85

Okay so I got closer to a solution but still have a minor issue. I’ve changed $queryPost to $wp_query and that got rid of the extra blank page. However, the title of the page still is saying there is an extra page.

It says People | 2/3, but there is not a 3rd page.

Post count: 85

Nevermind. I figured it out. I moved the new WP_Query code above get_header() and the title now has the right page count.

Post count: 3343

Hello, Great!
I’m glad you solve it.

Thanks

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.