Using CustomPress to create a standardized text content around custom fields.

I’m creating a “profile page” for companies who have joined our network. Each page will have a few custom fields (like “Member Since…” and the value is the year they joined). This page will also serve as a customized “landing page” for each company, so their employees can start here, and be pointed to information about how to use the products we offer.

I’ve set up a custom post type and some custom fields for this, and I can display them with shortcodes. All’s good. I’ll be making a template for this, as well, so we don’t have to put all the shortcodes in each page manually.

We want to set up these pages (when a new company joins) using the WP backend (of course, making a frontend editing form is also an option). Ideally, we can just fill in a few blanks, and it will show up on the frontend as a page.

What we don’t want to do is recreate a lot of standard text for every profile page. For example, we need a block of HTML on this page that instructs the users how to find downloadable resources. So we want to create some standardized text that will be plugged in alongside these custom fields — but we might want to change that text some day. We need something that can be changed via the WP backend, and we don’t want to edit the page template php just to change this standardized text block.

Making sense?

So I thought I would create another post type that is more “internal” and only has an admin interface, but isn’t public. We could set these standardized text fields, call them in the page template for the profile page, and display them alongside the custom fields in the final profile page.

I made a custom field to test this, associated it with the internal post type, and tried to add a shortcode to the profile page. It didn’t display.

I’m very new to custom post types, so I’m still trying to wrap my head around everything that’s involved. I don’t know if this isn’t working because of settings that are wrong, or because my idea can’t work, or if I’m just totally going about it wrong…..or if it’s because I am doing this with shortcodes in the editor for the profile page (custom post type) instead of calling them from a template.

If you can provide any direction, I’d really appreciate it. I’ve enabled support access to my site. The two post types I’ve created are member_pages (for the front-facing profile page) and member_pages_content (for the internal standardized text). This is a multisite, with CustomPress enabled on a site-by-site basis, and the site I’m doing this project in is the one called “Member Pages”. Everything is a sandbox, not production.

Thanks in advance!

  • Luís
    • Support

    Hi @kalico,

    I hope had been good today!

    You can try call the field in the template, but I think it will not work. I flagged the SLS team (our code experts :slight_smile: ) toto get their valuable feedback.

    Since this team deals with more advanced threads it may take them longer to reply.

    Cheers, Luís

  • mabraham1
    • Site Builder, Child of Zeus

    Thanks, Luis!

    I have a couple other ideas in mind to accomplish this, if CustomPress isn’t the way to go. I might just use a more generic php method to call the files I need from “somewhere else”. Or we might need to use an include plugin. It won’t be as elegant, but it might be a step better than actually writing all the content into the template file.

    I will look forward to feedback from the code team to find out if there’s a way to do this with CustomPress.

  • mabraham1
    • Site Builder, Child of Zeus

    I realize it’s not cool to bump threads that are waiting for a response….but this one is a week old now, and I’m a little concerned that it has dropped off of everyone’s radar entirely. Sincere apologies if I’m causing difficulty by doing this, but I really need an update to know where things stand. We’re getting close to going live, and this is one of the projects I have to make decisions about as quickly as possible. Thanks :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.