How to show file size of featured image? [duplicate]

Following function calculate file size, just you need change ‘/myfile/image.jpg’ with your featured image variable. <?php function file_size($url){ $size = filesize($url); if($size >= 1073741824){ $fileSize = round($size/1024/1024/1024,1) . ‘GB’; }elseif($size >= 1048576){ $fileSize = round($size/1024/1024,1) . ‘MB’; }elseif($size >= 1024){ $fileSize = round($size/1024,1) . ‘KB’; }else{ $fileSize = $size . ‘ bytes’; } return $fileSize; … Read more

How to Disconnect My Domain Name?

It sounds like you need to uninstall WordPress. If your web host includes a hosting control panel then you might have an item called “Quick Install” where you can view your current CMS installations. If you see WordPress listed somewhere you should be able to click a red X and remove it. If none of … Read more

Recent posts with comment count in “Sidebar” template [closed]

‘;’ is missing in this line echo “<dt>$recent_date &nbsp; / &nbsp; <span class=”comment”><a href=”$recent_link#disqus_thread”>$recent_count</a></span></dt><dd><a href=”$recent_link” title=”$recent_title”>$recent_title</a></dd>” For this reason code is throwing the fatal error. Please replace that line with this code echo “<dt>$recent_date &nbsp; / &nbsp; <span class=”comment”><a href=”$recent_link#disqus_thread”>$recent_count</a></span></dt><dd><a href=”$recent_link” title=”$recent_title”>$recent_title</a></dd>”;

Export Posts in excel [closed]

If you have direct access to your WordPress database, you could use a tool like PHPMyAdmin or HeidiSQL to query the post and user tables and extract the information you need from the appropriate tables. I discuss how an SQL query is constructed to get specific categories in Does WordPress Offer A Way to Get … Read more

how to create plugin single licence only [closed]

I do so, using an licence Server. The Plugin / The Theme sends an licence-code (md5 on the wordpress-url) each hour to that Server and check whether the licence-code is valid or not (also get some remote Settings, if you have multi-mode-licences (Basic, Standard, Extended) or so) and if it’s not valid, the plugin stops … Read more

PHP error in shortcode [closed]

You are not using proper syntax, so you are likely getting a syntax error. You are using some strange sign in your code where you should be using a single quote (‘). Also, use curly brackets to enclose a condition. It is easier to debug <?php if(function_exists(‘wooslider’)){ echo do_shortcode(‘[wooslider slider_type=”posts” limit=”3″ link_title=”true” layout=”text-bottom” overlay=”full” category=”homepage-feature-post”]’); … Read more