Setting different CSS for all pages except home.php

Instead of <?php if(!is_home() || !is_front_page()) :?> you could use <?php else: ?> This style will not affect the wp-admin part, only the front end of your web since this is used in header.php. A safe way is to use wp_register_style() and wp_enqueue_style() as described here in the Codex: http://codex.wordpress.org/Function_Reference/wp_enqueue_style http://codex.wordpress.org/Function_Reference/wp_register_style In your case it … Read more

How to Create a Multi Purpose Theme?

The way I do it is create multiple layout files, add the option to choose which one to use on the template options panel: layout-left.php layout-right.php layout-both.php Then on the index page you setup if layout X is chosen, load X layout. This is an example using the option tree plugin theme options: <?php get_header(); … Read more

How do I get information about a page, such as featured image, except, and title?

When you save a selected page in the Customiser you’re just saving the post ID of the page, which means you can just pass that value to any function that accepts a post ID as a parameter: $mytheme_f_page[1] = get_theme_mod( ‘mytheme_featured_page_1’ ); echo get_the_title( $mytheme_f_page[1] ); echo get_the_excerpt( $mytheme_f_page[1] ); echo get_the_post_thumbnail( $mytheme_f_page[1] ); The … Read more

How to create Custom Theme in WordPress 5.5.3 [closed]

There are countless guides online, just search ‘WordPress Theme creation’ on Google. A good place to start would be https://www.dreamhost.com/wordpress/guide-to-developing-a-wp-theme/ For folder structure I suggest you use a ‘WordPress Theme Boilerplate’, you can generate one here: https://underscores.me/, but there are loads of other options. More are listed here: https://www.wpbeginner.com/wp-themes/21-best-wordpress-starter-themes-for-developers/ Or if you don’t know php, … Read more

WordPress jQuery is not defined error

Your primary problem is that you are de-registering core jQuery. Don’t do that. Ever. Period. If you get rid of that, your other scripts will work properly. Just do this: function wpse62373_register_js() { if ( ! is_admin() ) { wp_enqueue_script(‘quicksand’, get_template_directory_uri() . ‘/js/quicksand.js’, array( ‘jquery’ ) ); wp_enqueue_script(‘easing’, get_template_directory_uri() . ‘/js/easing.js’, array( ‘jquery’ ) ); … Read more

Bestway to write php functions

The use of function_exists is a very bad habit that should simply be avoided in favor of using actions and filters. If you want child themes to be able to override some functionality you need to be very specific about which one and how, and function_exists is usually not specific enough for that.