How do I output using perch_content_create and perch_content_custom together?
<?php perch_content_create('Plugin Script Customization', array( 'template' => '_plugin-mod-script.html', 'multiple' => false, )); ?> <?php perch_content_custom('Plugin Script Customization', array( 'template' => '_plugin-mod-script.html', )); ?>
This mostly works. I delete the region named "Plugin Script Customization," and after I refresh the webpage, I refresh the region list and see that the region has appeared again. And it correctly lists the template file using the automated naming convention from the file name.
The <script> element I'm trying to output to the page doesn't appear in the rendered page source, though. I tried making a copy of the template file without the underscore and changing the corresponding reference in the two page functions, but that had no affect.
When I first just used perch_content and then selected the template from Region Options after choosing a different template initially (because I'm prefixing with an underscore to hide it from my users), it did output to the page. That doesn't seem like a permanent solution, though.
I notice that the "Items" column from the Regions list always says "0" when I try using the combination of perch_content_create and perch_content_custom. That must be the problem; it doesn't automatically populate with one instance of the markup. How do I change that?