0 %

Get current page URL in WordPress

Get current page URL in WordPress

Here is a handy snippet with which you can easily get current page URL on your WordPress website regardless of the page which is being displayed. It doesn’t matter if you need the URL for single post, page url, home page, category template, tag template, custom post type or any other WordPress template.

You can use this piece of code inside any PHP template file on your WordPress website:

Việt Lâm Coder

Việt Lâm Coder

Senior Fullstack & System Architect

Cần hỗ trợ website? Gọi / Zalo 0944.71.4545.

Trao đổi về dự án của bạn!

VietLamCoder CMS — Nền Tảng Quản Trị Flat-File Siêu Tốc LamWeb.com.vn — Hệ Sinh Thái Thiết Kế Web & Kho Giao Diện 2026