FATAL ERROR , Sommerce Theme [closed]

If you rename the theme folder(via FTP access, or the File Manager on your hosting control panel), that theme will be disabled. That will let you log in as admin, then you can select another theme. That will temporarily make your site look different, but you will be able to recover and select another theme. … Read more

Display Current Time using shortcode

Add this code in Theme function file functions.php function timeZone_funch( $atts ) { extract(shortcode_atts(array(‘timezone’ => ‘Asia/Kolkata’), $atts)); /* Asia/Kolkata is default Timezone */ $output=””; if (in_array($timezone, DateTimeZone::listIdentifiers())) { date_default_timezone_set($timezone); $currentTime = date( ‘d-m-Y h:i:s A’); $output = $currentTime; } else { $output = “Invalid Timezone”; } return $output; } add_shortcode( ‘current_time’, ‘timeZone_funch’ ); USAGE: [current_time … Read more

PHP 7.3 is required for WordPress 5.2 or Recommendation

To be honest, everything is explained in the article you’ve linked: To run WordPress we recommend your host supports: PHP version 7.3 or greater. MySQL version 5.6 or greater OR MariaDB version 10.1 or greater. HTTPS support So yes – that’s only recommendation (as WordPress definitely will work without HTTPS for example). And later in … Read more

How to format PHP if statement? [closed]

Just some slight syntax errors in your formatting. This should help: <?php if ( function_exists( ‘z_taxonomy_image’ ) ) { ?> <img alt=”” src=”https://wordpress.stackexchange.com/questions/236591/<?php if ( function_exists(“z_taxonomy_image_url’ ) ) { echo z_taxonomy_image_url( $child->term_id ); } ?>” /> <?php } else { ?> <img alt=”<?php esc_html( get_the_title() ) ?>” src=”<?php esc_url( get_template_directory_uri() . ‘/assets/images/blank325_170.png’ ) ?>”> <?php … Read more

how to change “Read more” button position [closed]

You need to first understand how WP theme hierarchy works , then only you will be able to find which file you need to define. Below is the URL to understand how WP theme hierarchy works. https://developer.wordpress.org/themes/basics/template-hierarchy/

Where to put include php file?

First of all I must say that I don’t think this is a wordpress related question. That said I hope this following suggestion helps you go in the right direction… Basically the include(“xxx-xxx.php”); already tells you where to put the xxx-xxx.php – in this case it should go into the same directory where the ‘parent’ is … Read more

Too many if’s and else if’s ?? – Must be better way [closed]

This question probably belongs to Code Review. Anyway, you can fill your event properties inside an array, which you can iterate: $events = array( ‘opening’ => array( ‘time’ => ‘…time here…’, ‘formatted_time’ => ‘…time here…’, ‘label’ => __(‘Opening:’), // or ucfirst($type) if you want… ), ‘closing’ => array( ‘time’ => ‘…time here…’, ‘formatted_time’ => ‘…time … Read more