Adding Updated Post Date PHP Custom Theme

In the template, right after the echo get_the_date(), add $before = ” Modified: ” ; // note spaces before and after string $after = ” “; the_modified_date( $d, $before, $after, $echo ); See https://codex.wordpress.org/Function_Reference/the_modified_date for date formatting options. One of those examples might be what you want to see. Of course, you’ll want to use … Read more

Automatically generator a WordPress installation on my subdomain

You’ll want to setup a Multis-site network – https://codex.wordpress.org/Create_A_Network If you know your way around code what you’ll need to do is use the wpmu_create_blog() function – https://codex.wordpress.org/WPMU_Functions/wpmu_create_blog – to create a blog whenever a user registers. What I would recommend would be a front-end form so when someone registers they can enter the name … Read more

Correctly Using checked function of WordPress

Now, based on your full code, there’s 3 problems: Line 60 of your code is missing a semi colon and throwing a fatal error. So: $instance[‘description_check_box’] = $new_instance[‘description_check_box’] Should be: $instance[‘description_check_box’] = $new_instance[‘description_check_box’]; On line 66, you’re using strings instead of proper boolean true or false values. Both if these are ‘truthy’ (see this answer … Read more

Handling repeater data

Try: $fields = get_field(“updates_list”). And then print_r to see what’s inside. You should have a nice looking array with all repeater fields and values inside. Then, stop using have_rows and get_row and just loop using a foreach loop. get_field() is usually used to retrieve a unique field, but because it’s a repeater field you get … Read more

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