Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress Base Path Hook?

Tags:

wordpress

hook

What's the wordpress / php hook to link to the base path of the wordpress installation? I want to be able to link to the home page of the wordpress blog, regardless of which directory the theme is installed in.

like image 813
Matrym Avatar asked Feb 25 '26 21:02

Matrym


1 Answers

echo '<a href="' . get_settings('siteurl') . '/wp-admin/index.php">admin</a>';

would give you (as an example)

<a href="http://me.com/blog/wp-admin/index.php">admin</a>

and

<a href="<?php bloginfo('url'); ?>">

would give you

<a href="http://me.com/blog/index.php">

like image 181
V a a m Y o b Avatar answered Feb 28 '26 23:02

V a a m Y o b