How I update WordPress theme and plugins

Did your customizations include changing the source code in the theme/plugin files? If yes, then you cannot update without loosing them. Instead you can use the child theme approach. Or you can make a plugin, that makes changes to another plugin or theme, which is harder than just changing the source files and you do … Read more

I don’t know how to put a placeholder [closed]

Use this code in your functions.php function wpb_change_title_text( $title ){ $screen = get_current_screen(); if ( ‘post’ == $screen->post_type ) { $title=”Post Title”; } return $title; } add_filter( ‘enter_title_here’, ‘wpb_change_title_text’ ); The above code will Place “Post Title” as placeholder text in dashboard -> posts -> Add New. Replace that text with your text and also … Read more

Section Background Images?

You need to modify your theme pages to support this change. If you already have a background in place you can modify it on a per post basis using the technics describe in that post. This plugin Custom CSS per post in WordPress is a good example at setting custom css per page. The pro … Read more

An unexpected error occurred when add theme

Probably an error caused by trying to install it from the zip file. If it’s in localhost try to unzip it and move the folder yourself to: yoursite/wp-content/themes/NEWTHEME And then try to switch to it from the wp-admin dashboard.

Unable to find translations in WordPress theme

There are three usual possibilities: Translation files somewhere in theme’s directory. Translation files in site’s directory, defined by WP_LANG_DIR constant (typically wp-content/languages). Theme’s original strings are in different language, so that is its default state and it needs to be translated to English.

Valid SQL query not returning results

Here you’ve did something wrong with $wpdb->table_name. It will only return the default WordPress table names. Not custom table names. And also when you call $wpdb->prepare then pass the parameter as array. So your function will be like below- function get_info($postid) { global $wpdb; // Here I assumed that your table name is ‘{$wpdb->prefix}places_locator’ $sql … Read more

Installing a theme on localhost, Ubuntu 16.04

The directory /wp-content/ of your local installations needs permission to create directory. It is necessary to upload the package and unpack. rights Maybe this should helps, if the user is www-data. chown -R :www-data /var/www/html/wordpress/wp-content/uploads chown -R :www-data /var/www/html/wordpress/wp-content/upgrades Or full access to the wp-content directory sudo chmod -R 777 wp-content/ php.ini Also maybe the … Read more