php links in pages

I want to create a page in domain.com that has content and links that point to pages that are created by new blog template for each site, so the change but the post number stays the same.
eg domain.com/site1/wp-admin/post.php?post=111&action=edit
domain.com/site2/wp-admin/post.php?post=111&action=edit
etc.

How do I enter wp-admin/post.php?post=111&action=edit and have it direct to properly to each site?

Do I use this?
http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/
What php code do I enter to direct properly to the corresponding blog?

Is this a security issue?

  • Timothy Bowers
    • Chief Pigeon

    I wouldn't be allowing PHP in posts or pages, that would be a security risk they could get your DB, kill your site install things to get your users details for third party site.

    Not worth the risk.

    Thinking about this quickly here is what I would...

    Just add the link as a url which I've shown in my screenshots.

    /wp-admin/post.php?post=111&action=edit

    Thats all you need to do to make this work for New Blog Template, no PHP, no wrapping code or more overheads. :slight_smile:

    But if you wanted something a little more complex with a page template then create a custom page template:

    http://codex.wordpress.org/Theme_Development#Custom_Page_Templates

    Use a real simple bit of code:

    echo home_url('/wp-admin/post.php?post=111&action=edit');

    There are numerous ways to do this, I would honestly go with the easiest option of just making an anchor with the url.

    Take care

  • Shawn
    • The Crimson Coder

    I'd get around the PHP risk issue by wrapping it in a shortcode. You could create a very simple shortcode that just takes the postid as a parameter, then obtains the current blog URL and appends the "/wp-admin/post.php?post=$1&action=edit" to it.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.