• I’m trying to print the my admin url on all of my pages (yes I am aware of the security implications). I’ve been messing around with ‘echo’ and ‘admin_url()’ to no avail

    This is the code i’ve tried that hasn’t worked
    <? echo admin_url(); ?>

    Also, once I get the correct coding, what file should I put it? Wouldn’t it be single.php?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi chef30,

    Looks like your code is correct. What makes you think it isn’t working?

    As for where to place you can put it in your footer.php file in your theme’s root folder (i.e. wp-content/themes/twentysixteen/footer.php) and it would then appear at the bottom of all your pages.

    Let us know how you get along.
    –AJ

    Moderator bcworkz

    (@bcworkz)

    WordPress PHP requires a full PHP delimiter:
    <?php echo admin_url(); ?>

    The <? ?> shortcut syntax, which sometimes works, is not 100% compatible.

    Thread Starter chef30

    (@chef30)

    put the code in the footer and it worked. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to print wordpress admin url on page’ is closed to new replies.