code

WordPress: Get URL Only of Featured Image

Untuk menampilkan featured image di WordPress sangat mudah sekali, cukup dengan perintah: <?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?> Contoh: <?php echo get_the_post_thumbnail( $post->ID, full, array( ‘style’ => ‘margin-bottom: 15px;’ ) ); ?> Dan option sizenya bisa disesuaikan dengan… Baca selengkapnya WordPress: Get URL Only of Featured Image

Remove HTML Comments at Web Source on WordPress Site

When viewing the source of your WordPress website, you may notice that there are a lot of HTML comments sitting there for no reason. HTML comments are not visible on the actual page and in some cases are there to… Baca selengkapnya Remove HTML Comments at Web Source on WordPress Site

QR-Code Studio for Windows and Mac OS X

QR-Code Studio for Windows and Mac OS X is free for personal use. This QR code maker software is the ideal tool for QR code design and creation.

Show Total Weight in Woocommerce

Add code below in your theme function, function.php to show total weight in Woocommerce. /** * WooCommerce * ————– * * Display cart total weight on the cart page * */ add_action(‘woocommerce_cart_collaterals’, ‘myprefix_cart_extra_info’); function myprefix_cart_extra_info() { global $woocommerce; echo ‘<div… Baca selengkapnya Show Total Weight in Woocommerce

WordPress: Remove query strings from static resources

This is normal code for remove query strings from static resources. Add the code below to your function.php. function _remove_script_version( $src ){ $parts = explode( ‘?’, $src ); return $parts[0]; } add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 ); add_filter( ‘style_loader_src’, ‘_remove_script_version’,… Baca selengkapnya WordPress: Remove query strings from static resources

PHP: Difference Between Include And Require in PHP

If the file that you want to include is not found then this function to return a PHP warning, which is different to the require function which will return a fatal error. The require function acts just like the include… Baca selengkapnya PHP: Difference Between Include And Require in PHP

Redirect WordPress Feed to FeedBurner

First open your [highlight color=”orange”].htaccess[/highlight] file which is located in your root directory. If you use [highlight color=”silver”]Wordpress SEO from YOAST[/highlight] then you just need go to [highlight color=”blue”]Edit Files in SEO menu[/highlight] then paste the following code: <IfModule mod_rewrite.c>… Baca selengkapnya Redirect WordPress Feed to FeedBurner

Enable gzip compression

Compressing the static contents with [highlight color=”orange”]enable gZip compression[/highlight] will drastically change your site loading time. Its a good practice for general web development too. You just need to place below code in your [highlight color=”salmon”]htaccess[/highlight] file: <IfModule mod_deflate.c> #… Baca selengkapnya Enable gzip compression

Add Expires Headers

Setting the expire header to far future date will instruct your web browser to cache and serve those cached content until that expire date. You can [highlight color=”salmon”]add expires headers[/highlight] using some easy edits to your [highlight color=”orange”].htaccess[/highlight] file. <IfModule… Baca selengkapnya Add Expires Headers

WordPress: Add WWW in front of domain without redirect or .htaccess

When you go to a website, you will find that some of them use “www.” in front of the domain name (example: [highlight color=”pink”]www.kloningspoon.com[/highlight]), and some of them do not. It is very common that both options will take you… Baca selengkapnya WordPress: Add WWW in front of domain without redirect or .htaccess

How to add featured image thumbnail to WordPress admin columns

The admin pages listing the site’s posts and pages come with various text columns like title, tags, categories, author and so on. In order to see what the featured images are, you have to visit each post or page individually.… Baca selengkapnya How to add featured image thumbnail to WordPress admin columns

Scroll to Top