-
AuthorPosts
-
May 12, 2014 at 4:34 pm #263351
Hi, I have differents custom post types, and I recreate the Portfolio Grid in order to recreate the same shortcode with does CPT. Everything works perfectly, except that my amount of post on those CPT are really big, and I want to show them without pagination. When I choose All number of entries, the page doesn’t show any kind of post (seems to be broke), but if I choose 100 or less, everything goes well.
What can be te problem with this? Thanks.
May 13, 2014 at 8:31 pm #264189Hey Pedro!
It could be an issue with how you’ve set up the custom post type or its taxonomy if its using a custom taxonomy. Without seeing the cpt setup we wouldn’t be able to diagnose it and in general we don’t bug test custom code through the forums.
If you can put what you have up in a gist or something like that we can take a look but there is no guarantee we’ll be able to find a fix.
Best regards,
DevinMay 14, 2014 at 1:05 pm #264612This reply has been marked as private.May 15, 2014 at 4:16 am #265055Hey!
Thank you for using the theme!
Do you mind if we take a look inside? Please post the login details here and set it as a private reply.
Cheers!
IsmaelMay 20, 2014 at 8:59 pm #267539Hey Pedro,
I’m trying to use some of the shortcodes with CPTs as well. Do you mind sharing your code or thought process on how to achieve this?
Thanks a ton.
May 21, 2014 at 4:21 am #267774Hey!
Thank you for using the theme!
If you want to create a new post type, please follow this one. This is much more extensive and you’ll be able to select the post type when using the Blog Posts or Masonry elements. Duplicate the includes > admin > register-portfolio.php file. Rename it to something else, for example register-life.php. Replace it with this code: http://pastebin.com/ZBpzgbSe
Add this on functions.php:
require_once( 'includes/admin/register-life.php' ); // register custom post types for life entries
This will register the custom post type life. You can now select the Life Entries when you’re using the Blog Posts or Fullwidth Masonry elements. Replace “life” with the custom post name that you want.
Regards,
IsmaelMay 21, 2014 at 3:34 pm #268043Ismael,
Thank you so much for sharing that method and chunk of code. That shows how much you care about your users!
I was able to successfully add a new CPT using the method above, in my case I added your “life entries” and “staff”, but am not seeing the option for those CPTs when initiating a shortcode. Am I missing a step?
Also, should be noted I’m doing this in a child theme.
Screenshot –> http://i.imgur.com/cFpYEZF.jpg
- This reply was modified 10 years, 6 months ago by Alex Morrison.
May 22, 2014 at 4:22 am #268427Hi!
Thank you for the update.
Make sure that you replace all life strings on register-life.php file to “staff”. Did you change the file name from register-life to register-staff? If yes, then you’ll need to change the code on functions.php to something like this:
require_once( 'includes/admin/register-staff.php' ); // register custom post types for staff entries
These inquiry has been asked many times and it works as expected.
Regards,
IsmaelMay 22, 2014 at 3:18 pm #268618Hey Ismael,
I’ve done just that, and have both “life” and “staff” CPTs registered. The problem is that they’re not showing up as options in some of the shortcode elements.
Thanks!
May 23, 2014 at 12:13 am #268934I don’t know what happened but I reimported all the posts again after a backup and everything works smoothly :)
@12Stone, which element are you trying to use?May 26, 2014 at 2:57 pm #270115Hi!
Thank you for the update.
@Pedro: Glad it is working now. :)
@12stone: Do you mind providing a link to the actual website? We would like to inspect it. If possible, post the register-staff.php code on pastebin.com so that we can review it. Maybe, you missed something.Cheers!
IsmaelMay 27, 2014 at 10:43 pm #270859@Ismael Thanks for the response. Here’s the code in pastebin: http://pastebin.com/fUZeHmzZ
May 28, 2014 at 8:46 am #271013@12Stone which element are you trying to use? Do you use a child theme?
May 28, 2014 at 10:27 pm #271457@Pedro Unsure, but was going to play with the masonry element a little bit.
May 29, 2014 at 5:08 am #271625Hi!
Thank you for the update.
I don’t see anything wrong with the code. Have you tried flushing the permalink settings? Go to Settings > Permalink then click the “Save” button once. If that doesn’t work, please post the login details here and set it as a private reply. We would like to check it.
Best regards,
IsmaelMay 29, 2014 at 3:05 pm #271828This reply has been marked as private.May 30, 2014 at 4:55 pm #272469Hi!
You need to add categories to actually see a CPT category in a selection.
Regards,
DevinJune 2, 2014 at 5:01 pm #273341Hey Devin,
That was it. (of course it was something dumb like that) Thank you a ton for your response.
-Alex
-
AuthorPosts
- The topic ‘Problem with Portfolio Grid’ is closed to new replies.