Use plugin_dir_url() to get the public URI for the directory where the calling PHP file is. <img src=”<?php echo plugin_dir_url( __FILE__ ) . ‘images/facebook.png’; ?>”> If the PHP file is in a sub directory of your plugin you have to go up: <img src=”<?php echo plugin_dir_url( dirname( __FILE__ ) ) . ‘images/facebook.png’; ?>”>
WooCommerce Custom Fields on Product Page As apparent from the above screenshot, we will add custom fields to the WooCommerce product edit screen under the General tab. We will be working on the file functions.php (default location to add custom function) of your theme folder. Required WooCommerce Hook The first step is to using the right hook. There […]
Table of Contents show Create a Direct “Add To Cart” Link Sometimes you just need to let the user add a product in the cart by clicking on a link. It’s really easy to do, just add ?add-to-cart=974 at the end of any link. In this example, 974 is the product id, and should be replaced by the […]
Chèn mã này trong function.php của theme đang dùng hoặc tạo 1 plugin mới:
[WP] Tạo Plugin Mới
90% plugin bạn sử dụng, sẽ có một số tùy chọn trong bảng điều khiển. Thật hợp lý khi cho phép người dùng một số tùy chọn cài đặt, để điều chỉnh chức năng của plugin, theo sở thích của họ. Điều này có thể làm tăng khả năng sử dụng của một plugin. Tạo […]
[WP]Facebook Fanpage
Truy cập link lấy mã chèn vào Website: https://developers.facebook.com/docs/plugins/page-plugin/?locale=vi_VN