Displaying Custom Post Types with upfront thems

I'm experimenting with Upfront and having some issues with custom post types. The two I am playing with are:

https://wordpress.org/plugins/resume-builder/

Creating a resume and then viewing the page only displays the text, all the related css content seems to not apply to the post.

The next one i tried is:

https://wordpress.org/plugins/woocommerce/

Trying to display products page and again the same issue occurs. However if using another theme, there is no issue.

Looked through your documentation but don't see anything describing how to work with custom post types. Also so an old post last year regarding a question about woo-commerce...but there wasn't really an answer.

So that said, custom post types are important, and thoughts regarding this issue?

Thanks!!!

  • Ben

    Noticed my resume plugin has a shortcode option. the short code displays on sub page, but when attempting to use the shortcode on the front page (which is what I want) its giving the following error after inseerting the shortcode in a code block:

    Ooops, something seems to have gone wrong with rendering the widget

    Perhaps I am doing something wrong.

    Still would like to see what the solution is for using woocommerce...

    -Ben

  • Milan

    Hello Ben

    Hope you are well today and thanks for asking us. :slight_smile:

    Actually Upfront is still not compatible with WooCommerce and our developers are working on it to make it. Hopefully it will be soon.

    Now Resume Builder is the plugin which is not rendering resumes very well with default standard WordPress themes too. Please take a look at this screenshot. :slight_smile:

    Cheers,
    Milan

  • Adam Czajczyk

    Hello Ben!

    I received you message, thank you. Apart from a short explanation that I sent you in my replay I'm responding here as it may be helpful for other members of our community, I hope you don't mind that :slight_smile:

    ?I think the fact that the shortcode performs well for you means that you could try using it this way:
    ?
    ?- create a new page via WP dashboard (do not assign any "special" template to it so it worked well with Upfront)
    ?- open this page (front-end) in your browser
    ?- enable Upfront editor
    - put (drag&drop) "Text" module on a page
    - put the resumee shortcode there and save layout.

    Assuming that the plugin is working fine and doesn't implement any non-standard ways of handling custom post types, it's highly probable that this way should work, letting you edit layout of the resumee page.

    Let me know if it works for you, please!

    Best regards,
    Adam

  • Ben

    Adam Czajczyk

    That's what I showed you in the example, and that works great. However...that's not a great solution.

    My goal (dream) is to make a pro-sites solution for non-technical people to create websites. The steps you indicate should be unnecessary and add a lot of unnecessary friction.

    In a normal theme situation, the expected behavior i believe would be for the custom post type to use the page.php template in the directory. This automatically sets the header/footer and page body class in a normal expected areas. For further customization a developer could add additional templates to be recognized by the custom post type, but always there is the default page.php template to fall back on.

    This standardized method for no good reason is not occurring with upfront....i think this is a bug.

    If creating a new page uses a standardized look from some default template, the same should occur for a custom post type...right?

  • Adam Czajczyk

    Hello Ben!

    Thank you for your replay. I wasn't aware that you're already following this way. I was however able this time to get Resumee Builder working on my site and I was also able to make id displayed on Panino powered site.

    I created a new post and put Resumee shortcode there via regular WP post editor in dashboard, using "Text" mode. After saving the post I was able to view it in browser and edit its layout just like layout of any other kind of post. The downside though is that it is a post and edited layout would be applied either to this particular post or to all regular posts.

    This works with pages instead of posts as well. Please note however that it's not a default resumee post/page (the one you're taken to after clicking the "View" link for selected resumee) but a regular WP post/page created via WP dashboard ("Posts/Pages -> Add new").

    Could you please double-check if this way works for you?

    Best regards,
    Adam

  • Ben

    Adam Czajczyk

    I can definately confirm what you said works and I dont know if you got the email i sent a while back but that shows that it works.

    That said, that is a lot of hoops to jump through to work around the problem...i'd like to have the problem solved and have the "default resume post/page" displaying properly.

    The work around is not a reasonable solution to have to walk every customer client through especially if the real solution is having upfront recognize the basic page.php of one of its themes whe there is a custom post type...that seems to be the error, and in addition recognizing a custom post page template. Or maybe this is already available and I'm not setting it up right.

    Let me know thanks!

  • Adam Czajczyk

    Hello Ben!

    I got only a single e-mail from you and I sent my replay just before posting here. The site at given link looked quite differently then (no headers and footers, pretty much the blank page with Resumee output). I can see now that this is working for you.

    I agree that this is a workaround rather than a real/permanent solution. The issue with the "real resumee page" (the one produced by the plugin) is that it's a kin of "virtual" page and Upfront's not fully compatible with such pages. I'm not sure how the Resumee Bulder plugin is handling resumees but this doesn't seem like fully "standarized" custom post. The issue with "virtual" pages affects some of our own plugins also as well as extremely popular BuddyPress. Our developers are working on this and we're hoping for a full compatibility soon. This would most likely solve this particular problem as well. I'm not able to give any ETA on this but it's under development and will come with one of future updates.

    Kind regards,
    Adam

  • Ben

    Adam Czajczyk
    I apologize, I forgot to be a wordpress developer for a second. So i don't know about the "virtual" stuff you were referring to, but according to the codex, here is how you make a template for a post type:

    https://codex.wordpress.org/Post_Type_Templates

    So I had done this in my other themes successfully by copying single.php to single-resume.php and then for the body entering in the needed code to render the resume, works great.

    However upon reviewing the single.php:

    the_post();
    $layout = Upfront_Output::get_layout(Upfront_EntityResolver::get_entity_ids());
    
    get_header();
    echo $layout->apply_layout();
    get_footer();

    i'm not sure where to insert my custom code when creating the template for the custom post type in the file single-resume.php

    Previously i would insert the shortcode for the resume i want to render in place of where the normal loop would occur to render the content for the page.

    However with this template placing that short code with the post id does work as expected. I am able to get the post id for the post, however the placement is the problem: it doesn't appear in the body of the page, instead always below or above the header depending on where i place the shortcode.

  • Adam Czajczyk

    Hello Ben!

    The "virtual stuff" I was referring to are pages that do not physically exist in WordPress and are created "on the fly" e.g. by a plugin or theme. I put the "Resumee Builder" pages under the same roof which was a bit too much of generalization so I'm sorry for causing confusion here. What I meant regarding resumee posts was that I know that these are posts of custom type but I suppose there may be some content created/handled by the plugin "on the fly" which would make it efficiently the same issue as with aforementioned "virtual pages".

    In general, custom posts should work with Upfront and when you save changes made to layout of such post you're asked whether you like to apply changes to "all posts of this type". In this case however it seems that some aspect of the plugin and/or the way it's handling its own custom content is breaking compatibility.

    The bottom line is however that the Upfront is having difficulties handling this kind of stuff and our developers are still working on the issue. There's currently no easy solution for this other than using shortcode the way I suggested (either by putting it into "Text" module or adding to a page via backedn editor in "Text" mode).

    Upfront is different than regular WP themes and doesn't support custom page templates. There's no way currently to put you your code into the custom template file the way you'd like to. There may be a support for custom templates included in future however for now adding more features and compatibility to Upfront is a priority. Our developers are also working on a "full scale" theme builder which would also be a solution here as it would let you create your own Upfront child-theme (starter theme such as Panino, Scribe etc) from scratch.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.