Skip to content

mywp_url

Example Sites

Description

mywp_url shortcode can be get the URLs.

 

Usage

Get the default url is current blog home url.

[mywp_url]

 

Attributes

admin=”1

Get the admin url.

[mywp_url admin="1"]

Result

http://example.com/wp-admin/

 

network_admin=”1

Get the network admin url.

[mywp_url network_admin="1"]

Result

http://example.com/wp-admin/network/

 

site=”1

Get the frontend url.

[mywp_url site="1"]

Result

http://example.com

 

blog_id=”***

Get the specific blog/site url.

[mywp_url site="1" blog_id="2"]

Result

http://site2.example.com

 

site_id=”***

Get the specific blog/site url(Same to blog_id).

[mywp_url site="1" site_id="2"]

Result

http://site2.example.com

 

post_id=”***

Get the permalink of post.

[mywp_url post_id="1"]

Result

http://example.com/hello-world

 

login=”1

Get the login page url.

[mywp_url login="1"]

Result

http://example.com/wp-login.php

 

logout=”1

Get the logged out url.

[mywp_url logout="1"]

Result

http://example.com/wp-login.php?action=logout&_wpnonce=*********

 

lost_password=”1

Get the lost password page url.

[mywp_url lost_password="1"]

Result

http://example.com/wp-login.php?action=lostpassword

 

current=”1

Get the current page url.

[mywp_url current="1"]

 

esc_url=”1

Return url to escape on WordPress. Same to esc_url().

[mywp_url esc_url="1"]

Result

http://example.com/

 

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top