Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7014053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:28:14+00:00 2026-05-27T22:28:14+00:00

in my custom theme-settings.php (zen-subtheme) i put following code to get a new textarea

  • 0

in my custom theme-settings.php (zen-subtheme) i put following code to get a new textarea with textformat in my theme-settings:

  <?php
    function paper_form_system_theme_settings_alter(&$form, &$form_state)  {
        $form['paper_data'] = array(
        '#type' => 'text_format',
        '#title' => 'Put Text in here:',
        '#rows' => 5,
        '#resizable' => FALSE,
        '#default_value' => 'xyz..',
        '#format' => 'full_html'
      );
    }

the form is working perfektly, but when i want to access the variable by writing

<?php
$pdata = theme_get_setting('paper_data');
echo $pdata;
?>

in my page.tpl.php, the content of the variable is not rendered – instead the word “Array” is printed …
What’s wrong and why? (If i use ‘textarea’ as type instead of ‘text_format’, all is rendered well.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:28:15+00:00Added an answer on May 27, 2026 at 10:28 pm

    You will understand when you use something like the Devel module’s dpm() function to check the variable rather than echo(). Coding Drupal without the Devel module is, IMHO, folly.

    The issue very likely stems from your use of the text_format type. As you can see, it saves both the textarea value as well as an associated text format. When this is used Drupal returns the data in structured form which varies depending on the type of format.

    dpm() is your friend 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following this tutorial to create custom Wordpress options the function within theme/functions/admin-menu.php which
I have a problem with advanced settings in theme-settings.php. i can build custom form
In my Drupal rules settings I don't have Execute custom PHP code option anymore.
I am relatively new to wordpress, I am creating a custom theme, and so
right now, i code custom wordpress theme and testing it in xampp windows XP
On Drupal 6 using a Zen subtheme, our custom stylesheet is beautiful and perfect
I have set up some custom symfony project-level settings in the file config/project.yml following
I have the following code: <?php if ($foo) { echo $foo; } ?> However,
This is a PHP problem in WordPress while using a custom theme options panel.
I currently have a web site where users can select a custom theme. After

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.