If get_option( 'blogkori_theme_options' ) doesn’t have a value you’re not going to get an array back, which means that $options['googanalytics'] isn’t valid. You’ll need to account for this possibility.
You could do that by checking if googleanalytics is set, and setting it to a new variable, or an empty string if it’s not set:
$options = get_option( 'blogkori_theme_options' );
$googleanalytics = isset( $options['googleanalytics'] ) ? $options['googleanalytics'] : '';
Then you would just echo $googleanalytics in the textarea:
<textarea id="blogkori_theme_options[googanalytics]" class="large-text" cols="50" rows="5" name="blogkori_theme_options[googanalytics]" onclick="this.focus();this.select()"><?php echo esc_textarea( $googanalytics ); ?></textarea>
Related Posts:
- How do I change/modify the_post_thumbnail(); html output?
- Why do templates contain so many PHP tag pairs?
- How do I use Shortcodes inside of HTML tags?
- Why would a GET variable one one page of a site cause a 404 error when a GET variable works on another page of a site?
- Where should I install a PHP library into WordPress so that code in a webpage can activate it?
- WordPress Shortcode and Dynamic CSS
- Correct way to make static pages editable in wordpress
- How do I edit the php/html for a particular post?
- Nice scroll to wordpress
- Multiple pages on one with different HTML
- Is it ok to replace php code with html?
- Add custom HTML to posts page
- Minify HTML, CSS, JS with PHPWee?
- Header has extra HTML block at top before my code
- Blank space at beginning of tag?
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- Placing raw HTML inside a WordPress shortcode
- How to only show page id as body class?
- Shortcode content output but not in correct place
- An unwanted inline style is added to my body tag
- How to properly insert a link to a template in WordPress?
- Show post in slider
- How can I hide Home in my menu in a specific page?
- HTML tags in bloginfo description
- Add a class to the anchor tag on HTML5 gallery
- Transferring working local PHP site to wordpress – with database (MySQL)
- how to remove metadata from the posts of my blog?
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Using the echo command adds unwanted br tags to source
- How to store data from multiple forms using ajax and php
- Use DOMDocument with ob_start breaks my HTML code
- selected option if current category is the value
- Input data from email form not going to JSON file
- Different post styles depending on category
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- Commenting out unwated CSS/scripts in HTML with PHP
- Syntax error when I try to insert my loop into an unordered list? [closed]
- How to make modifications only to certain elements of an HTML string on the server-side?
- Printing HTML codes
- How to retrieve the data from the sever and displaying it in a page?
- How to execute html code inside php?
- Add data-id attribute to child page links
- How to edit HTML of my website on WordPress? [closed]
- wp_insert_post() with HTML tags using PHP
- Prevent redirect to wp-login.php
- How to use the checked() function to check for a non-empty var
- Calling function in loop causes repeat data
- Find out last 7 days of upload images, last week uploaded image from Gallery and display them in different pages
- Link to page with posts of specific type
- Custom forms with HTML
- Wrap title and excerpt in a div (latest posts block)
- Displaying images outside the content
- how to changes mobile menu toggle breakpoint in WordPress
- PHP inside echo HTML
- WordPress User Meta value variable into Google Gauge Chart
- List sub categories and corresponding posts of a parent category
- population category dropdown and sub category onselect
- PHP function for horizontal Woocommerce thumbnails and badges
- What are the advantages/disadvantages of ways to use php template files?
- Using Google Analytics in an enqueued JS file
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- couldnt show short code atts in category
- separate list of programs in html/javascript coming from php
- Remove span tags from WooCommerce Downloads page
- Drop down question
- How to enable HTML tags in category description without breaking the category page
- How do I disable cache for a certain page?
- Can’t display anything through homepage text editor
- How can I create a shortcode from an html and php code written together
- Woocommerce custom attributes list help
- WooCommerce multiple custom fields code
- How to override html codes in wordpress?
- Access certain Entry in HTML-Table and pass the entry-data in WP not working [closed]
- Target a specific container to style on WordPress storefront theme
- Create html tree sitemap
- Pass form attributes to another php template in wordpress
- Custom HTML form using PHP – help with ajax/username validation
- Code works on page-example.php by not category-example.php
- How to create a php page to collect information from a html page
- Can’t make product images clickable
- I need help implement a Javascript code into the PHP file
- WooCommerce – Print Processing orders [closed]
- Category – “No content found”
- Add options to WordPress backend
- Add extra markup to WP menus
- Automatically create a loop for post ID
- WordPress – Image href for home menu nav not working
- Save Option on Database
- Parse error: syntax error, unexpected ‘}’ in
- Sorting Problem
- Custom HTML/CSS Theme into WordPress – SEO considerations
- How to enqueue structured data as file – jsonld file seems not to work
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- Slick slider not working on wordpress
- Why do I get a 404 error on my custom post type archive pagination?
- change div text and link for logged in users
- Font Awesome Icons as squares [closed]
- How to modify default tags in wp_head()
- #038 & wordpress Help
- How can we upload custom page files?