Support Forum
Hi
I have managed to setup a fairly complex settings page area for a site that I'm working on that will allow them to control all of the functionality that they require on the site in one place. I've used Custom HTML fields to provide some basic instructions in groups of fields but those instructions are just basic.
I got to thinking about how this might be improved. Obviously I could create a custom post type (help) and add help articles to it. Conventionally though these would end up being diplayed on the front end, where in reality they would not be of much use. Ideally I'd like to display these in a seperate tab in my settings page.
Is there a way to hook up mb views to show an MB custom post on an MB sttings page on the backend?
Could you perhaps suggest another way that this might be done?
Many thanks
Hi Dom,
If you want to show the post on the settings page, you also have to use the Custom HTML field to show it up. There is no actions or templates that support showing post on the settings page like that.
Hi
Thanks for getting back to me.
If I understand you correctly to achieve this I'd need to effectively take the post in raw html and then display that in a custom HTML field within a settings page.
As I use Oxygen builder would it be possible to create a specific template to display 'Help' cpt posts and embed the html for that template in a custom HTML field on a settings page, which would then obviously display the correct help topics that the user requested?
Many thanks
Hi,
If Oxygen supports the shortcode template, you can create a custom callback function to display the shortcode.
Field:
array(
'type' => 'custom_html',
'std' => '<div class="alert alert-warning">This is a custom HTML content</div>',
'callback' => 'display_template',
),
Callback:
function display_template() {
echo do_shortcode( '[template_shortcode]' );
}
Thank you, I can see that that might well work, I'll give it a spin.