Jump to content

Archived

This topic is now archived and is closed to further replies.

clinton4

Need help with opts array in section api

Recommended Posts

clinton4

Hi,

 

I am working on a section and need to add the array from wp_get_theme()->get_page_templates(); into the opts array under section_opts()

 

Any advice?

Share this post


Link to post
Share on other sites
clinton4

Here is what I am trying to do:

http://pastebin.com/GgFdgBbh

 

Here is the content of $buildArray:

Array
(
    [optvalue1] => Array
        (
            [cpt-demo.php] => mycustompage
        )

    [optvalue2] => Array
        (
            [page.alpha.php] => Template | 1
        )

    [optvalue3] => Array
        (
            [page.beta.php] => Template | 2
        )

    [optvalue4] => Array
        (
            [page.delta.php] => Template | 4
        )

    [optvalue5] => Array
        (
            [page.epsilon.php] => Template | 5
        )

)

And this is the result I get in my select window:

image.png

 

Why do I get undefined here? What is wrong?

Share this post


Link to post
Share on other sites
Rob

Hi,

First, please don't post essentially the same topics multiple times. This slows down support for everyone else.

 

While you seem to be following our docs, this is a support forum, not a development forum.  The staff are here to help people with problems of installation, CSS, etc.  We're not developers or coders.  You really need to discuss this with a developer. Unfortunately, you'd have to engage one for that purpose.

 

I've asked Danny to review your upload on the duplicate topic for the purpose of correcting the docs if they're correct.  But you're capable of posting corrections to the docs yourself, as you should see at the bottom of each documentation page.

 

Thanks for your understanding.  I'm closing this one in favor of http://forum.pagelines.com/topic/29877-why-wont-opts-register-in-section-opts/#entry175650.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×