I would like to include the content of one page (with KARMA tabs) as boilerplate content in multiple other pages (inside KARMA accordions)
I have tried a few plugins, the one currently installed is "RPS Include Content."
The RPS include_page shortcode places the content on the page correctly HOWEVER with multiple [/raw][raw][/raw][/raw][raw][/raw] tags throughout the page and the accordion lay-out in a permanent expanded position with certain formatting removed.
I have live examples of all of the above for you to look at.
I would prefer a simple shortcode [include_page "http://www.domain.com/page or post URL"] that leaves the specific theme related formatting intact. I am also open to an html file outside the theme--but that would be less preferred.
John Cotton answers:
<blockquote>I would prefer a simple shortcode [include_page "http://www.domain.com/page or post URL"]</blockquote>
Do you literally mean the whole contents of a page on an external website?
Do do you mean just the body of the page?
Or do you mean a page within the current site (so could be accessed with a page id or slug?
Dirk Degra comments:
I would like the be able to include in any page of the same site, inside of an accordion <strong>one specific page</strong> including formatting and shortcodes (tabs in this case). Not from an external website.
Kind of a recurring boiler plate that I wish to display inside of an accordion. This is more elegant that a link to another page or an iframe, or a pop-up, or other window.
Does than answer the question? Would you like me to send you a live link of the problem I am enduring. Can I do this privately or does it need to be publicly posted here.
Dirk Degra comments:
Think I did not answer all of your questions.
Yes just the body, which is contained in a series of tabs. I do not need the header and all other stuff. But YES, I want the shortcode tab formatting to remain intact inside the accordion.
Yes a page within the current site that can be accessed - displayed with a page id.
John Cotton comments:
There's a nice solution here:
[[LINK href="http://alex.leonard.ie/2010/09/09/wordpress-shortcode-to-insert-content-of-another-page/"]]http://alex.leonard.ie/2010/09/09/wordpress-shortcode-to-insert-content-of-another-page/[[/LINK]]
Dirk Degra comments:
Thank you John. Do I add the code to an existing php file or inside the page. Cleanest way would be to have a php file with an include_page shortcode tag. Can you direct me on how and where to position the code inside the appropriate file location inside the theme.
John Cotton comments:
The code from that example all needs to go in your functions.php file.
Then, if you've got a template file that you are using to out the accordion, just put this in it where you need the include page to be.
<?php echo do_shortcode('[pa_insert page="1228"]');?>
Alternatively, you can put this
[pa_insert page="1228"]
in an actual page on the dashboard.
Dirk Degra comments:
Awesome. The SECOND option worked LIKE A CHARM. HOWEVER. I am lost all of the KARMA Theme tab shortcode page formats. I basically just see the standard HTML formatted copy. Great progress though. I guess not possible without a lot of work to get the tabs to work so the included copy is not a long scroll rather than elegant. I am OK with the result though and will remove the theme tab formatting if this would be too much of project and require to rewrite the Theme Shortcodes.
How much do I owe you for your help?