Illegal string offset error in wordpress theme options textarea

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 … Read more

Redirect WP 404 to html

It looks like you have it: ErrorDocument 404 http://domain.com/custom_404.php You just have to create the static 404 page called custom_404.php in your child theme or the root of your domain. Child theme would be: http://domain.com/wp-content/themes/child_theme/custom_404.php

Highlight the links without using dropdown

SOLUTION I found it by using the <?php wp_list_pages( $args ); ?> with customizing the args to display only selected children by id. $args = array ( ‘title_li’ => ”, ‘child_of’ => $post->ID, ‘include’ => 47 ) <h4> <?php wp_list_pages( $args ); ?> </h4> and setting the css to target the current and its parent … Read more

Adding function to child theme’s function.php

You can’t recall the same function or PHP will throw an error. Make your own function and call the same action hook, but give it a priority of 1 which should overrule the parent theme function. function custom_oblique_post_link_to_single() { if ( ! get_theme_mod( ‘read_more’ ) ) :?> <a href=”https://wordpress.stackexchange.com/questions/282703/<?php the_permalink(); ?>”> <div class=”read-more”> <?php echo … Read more

How to make home widgets appear horizontally

Use CSS3 flexbox to control layout of widgets. First, wrap widget divisions in a container division <div class=”widgets-container”>. Add a unique class to each widget division ( in our example: widget-1, widget-2, and widget-3 ). Example code: <div class=”widgets-container”> <div class=”widget-1″> <!– widget-1 code below –> <h2>Widget 1</h2> </div> <div class=”widget-2″> <!– widget 2 code … Read more

HTML Form Submit to table in same page

Couple of things with this. Your action attribute is empty. That’s the attribute that tells the browser where to send the posted form data. Should be a field or if you’re using AJAX, I always put # in there and let the javascript do it’s thing. Not sure about the cf_name attribute in your input … Read more