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.

Add CSS class to PHP Statement

You need to wrap it in an HTML element that has a class. Doing it with your code will require changes. You can either do it outside the PHP, which will require changing where you open and close the PHP tags: <?php } else { ?> <span class=”classname”> <?php esc_html_e(‘No results found’,’ThemeName’); ?> </span> <?php … Read more