Case: My Client report to me that he can’t insert a data to a web application. Analyze: i check the postgresql and i debug the query and result this error: ERROR: duplicate key value violates unique constraint “table_name_pkey” (SQLSTATE 23505) Question: How to fix this bug ? Answer: First -> Check the last id from […]
Copy File from Linux to AWS S3 Custom Endpoint
Case: I want to backup a filename from Linux (ubuntu) server to Contabo Storage (Singapore) with url https://sin1.contabostorage.com (compatible with AWS S3) Question: How do i copy it with AWS Command Line … ? Answer: aws s3 cp source_filename s3://destination_dir/destination_filename –endpoint-url https://sin1.contabostorage.com/bucket_name Explain: destination_dir will placed inside a bucket_name
Create a folder in AWS S3 using SDK for Go V2
Wanted: I want to create a folder named with “testing” Question: How to do that, cause i didn’t find any tutorial in AWS about creating folder in S3 with GO v2 Answer: You can use this function: Explain:
Export data from PostgreSQL table
Syntax: Example: I have a database name “starsender” and a table name “starsender_template_message” Question: How to export “starsender_template_message” table …? Answer:
Remove Admin Menu in WordPress
Request: My client ask me to remove Comments and Pages menu from Admin Dashboard Question: How to do it .. ? Answer: We can use this function remove_menu_page($menu_slug) information: How to get menu slug Just tap on Pages menu and see the URL like this “edit.php?post_type=page” is a menu slug Full Code
Remove Box in wordpress Dashboard
Request: My client ask me to remove all box in wordpress dashboard Question: How to do it .. ? Answer: We can use this function remove_meta_box(‘css_id’, ‘dashboard’, ‘position’); information: Full Code:
Membuat Customize
Keinginan: Saya ingin merubah warna header melalui menu customize Pertanyaan: Bagaimana caranya … ? Jawaban: Kita akan membuat sebuah input text yang bisa diinput kode warna, selanjutnya simak langkah2 dibawah ini: Elemen Yg Dibutuhkan Untuk membuat elemen dalam Customize maka diperlukan 4 komponen, yaitu: Membuat Kode Bukalah file function.php lalu masukan kode berikut ini: Keterangan: […]
Memberikan Style ke Menu
Pembuka: Kita akan memberikan style navbar dari bootstrap ke menu kita Caranya: Buka file header.php lalu ganti div id=’menu’ beserta isinya dengan kode berikut ini: Keterangan: Versi HTML Fungsi wp_nav_menu yang sudah diberi class maka versi htmlnya akan terlihat seperti berikut ini: Menambahkan Atribut nav-link Buka file function.php dan masukkan kode berikut ini: Keterangan: Kode […]
Menampilkan Menu di Themes
Pembuka: Saat ini saya ingin menampilkan menu dalam header Caranya: Buka file header.php lalu masukkan kode berikut ini dibawah dibaris paling bawah: Keterangan: Hasil: Bukalah webmu di browser maka hasilnya akan menjadi seperti berikut ini:
Menambahkan Menu ke Themes
Buka file function.php lalu masukan kode berikut ini: Keterangan: Hasil: Buka wordpress Admin lalu pilih Menu Appeareance maka akan tampil seperti berikut ini: Terlihat Menu atas tampil di pojok kanan bawah pada gambar diatas Tambahkan Page ke Menu Pilih beberapa page lalu tekan tombol Add to Menu maka akan menghasilkan hasil seperti gambar dibawah ini: […]