﻿Installation Guide

This ZIP file contains three files:
instructions.docx, instructions.txt and put-this-code-in-functions.php

Part 1 — Create a Child Theme in WordPress
1. Log in to your WordPress site.
2. Go to Plugins → Add New.
3. In the search field, type “Child Theme”.
4. Select “WP Child Theme Generator”.
5. Click Install Now, then Activate.
6. In the main menu, go to Appearance → Child Theme Gen.
7. In the dropdown Choose a Theme, select your current theme.
8. Under Child Theme Options, edit Author Name and Child Theme Description.
9. Select Create & Activate.
10. Click Create Child Theme.
11. When done, you may uninstall the Child Theme Generator plugin.

Part 2 — Upload the Code to Your Child Theme
Use WinSCP, FileZilla, or another SFTP/FTP client.
1. Open your site’s server connection in WinSCP/FileZilla.
2. On the left panel, browse to the folder where instructions.docx , instructions.txt and put-this-code-in-functions.php are stored.
3. On the right panel, navigate to the root folder of your website.
4. Open wp-content.
5. Open themes.
6. You will now see your main theme and the newly created child theme.
7. Open the child theme folder.
8. In this folder, you will find functions.php and style.css.
9. Open functions.php (double-click, or right-click → Edit).

Part 3 — Editing functions.php
1. The functions.php file contains only a small amount of code and ends with the line “Your code goes below”. This is where you will paste the new code.
2. Also open put-this-code-in-functions.php in the editor.
3. Copy all code from put-this-code-in-functions.php, except the first line (<?php).
4. Paste this copied code at the very bottom of functions.php, below the existing content.
5. Save functions.php.
6. Close the editor.

Part 4 — Add the Visitor Map Shortcode
1. Log in to your WordPress site.
2. Go to the page where you want the Visitor Map to appear.
3. Add a Shortcode block/component.
4. Insert the shortcode: [visitor_map]
5. Save or update the page.

How It Works
Every page on your website will register a visitor.
The code:
• identifies the visitor’s IP address
• retrieves latitude/longitude data for new IPs
• stores this data in the database
• adds a red dot on the map for each unique IP
Only one database entry per IP address is stored.


This code is provided as a personal hobby project and is offered as is, without any guarantees or warranties; by installing or using it, you agree to do so at your own risk and responsibility.

