Add more widget areas to a theme

You have to add this code in the functions.php file: /** * Register new sidebar * */ function new_sidebar_widget_init() { register_sidebar( array( ‘name’ => ‘new-sidebar’, ‘id’ => ‘new-sidebar’, ‘before_widget’ => ‘<div id=”new-sidebar”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ”, ‘after_title’ => ”, ) ); } add_action( ‘widgets_init’, ‘new_sidebar_widget_init’ ); and then call the sidebar from a … Read more

WordPress add post format support not working

Add this to your child theme which over-rides what your parent theme supports. Post Formats for Posts add_action( ‘after_setup_theme’, ‘wpsites_child_theme_posts_formats’, 11 ); function wpsites_child_theme_posts_formats(){ add_theme_support( ‘post-formats’, array( ‘aside’, ‘audio’, ‘chat’, ‘gallery’, ‘image’, ‘link’, ‘quote’, ‘status’, ‘video’, ) ); } And here’s the result tested on the Twenty Twelve default theme. You can also use the … Read more

Can I have two different theme for two different language?

A WordPress Multi-site can handle multiple languages with individual themes and plugins activ. It’s like having multiple sites, one for every language, within one Installation. Every Site can have it’s own design, set of activ plugins and users. Read troth Method No. 5 on this Page for Details and Plugins that can help: http://codex.wordpress.org/Multilingual_WordPress

How to load jQuery in the footer – nothing works for me

You need to load your scripts in the footer so you’ll need to add them to the functions. This method works for parent themes dependent on jQuery. For child themes Change: get_template_directory_uri() To get_stylesheet_directory_uri() Example code for parent themes: function wpsites_load_scripts() { wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘wpsites_load_scripts’ … Read more

Force theme or disallow theme change

Lot of useless comments on this post from what seems like a pretty simple question. change below $theme_directory_name=”twentyfourteen”; to your theme… thats all you have to do. First function sets your theme no matter what. Second one disables interface to edit themes. function selfish_hardcoded_theme() { $theme_directory_name=”twentyfourteen”; add_filter( ‘template’, create_function( ‘$template’, ‘return “‘ . $theme_directory_name . … Read more

How to merge two WordPress themes?

Milo is correct, it is a very broad question. That said, what you want to do is totally doable, BUT, it is going to take effort. There is no easy way in mergin two themes into one. You will have to set up a completely new theme, and then you have to start to extract … Read more

Prevent WordPress installing plugins and themes via Admin

You can simply delete the lines from your wp-config.php. define(‘FTP_HOST’, ‘yourhost.com’); define(‘FTP_USER’, ‘youruser’); define(‘FTP_PASS’, ‘yourpass’); However, this does not automatically mean that you are secure. There are a lot of backdoors where malware could be injected, starting from the server, security-issues in your plugins, outdated software etc. Please be sure to check for all the … Read more

How to make theme elements customizable in wordpress?

As per comments: this is what the Customizer API is for. In the case of the header there are a dozen parameters to tweak the behaviour with. Like this: $defaults = array( ‘default-image’ => ”, ‘width’ => 0, ‘height’ => 0, ‘flex-height’ => false, ‘flex-width’ => false, ‘uploads’ => true, ‘random-default’ => false, ‘header-text’ => … Read more