Forums

Adding post-slug to MANAGE (8 posts)

  1. Lorelle
    Member
    Posted 4 years ago #

    After some discussion, I'm still interested in adding the post-slug (page/post link) to the Admin Manage screen, but I'm overwhelmed with the coding.

    Anyone have suggestions?

    The reason for this request, and considering it for everyone, is the ability to quickly see, and even print out, the permalink for the post when referencing it from another post. This would speed up the process, I think. For me, I'd print out the list by month so I can keep it near me and reference the links as I work the related posts.

  2. mdawaffe
    Member
    Posted 4 years ago #

    This is not an answer to your request, but it may be a usable, alternative solution.

    I use the RunPHP plugin by James van Lommel. This allows me to insert the following code into my posts.

    <a href="<?php echo get_permalink(42); ?>">post 42</a>

    So even if my permalink structure changes, or the post slug changes (neither very likely, but...), the link will still work automatically.

    If you want this plugin to easily work with pages, as well as posts, you need to edit one line of its code (or at least I did a while ago when I downloaded it). See this comment (I don't know why some of that comment appears in italics, treat it all as plain, unformatted text).

    This way you only need to know the post's/page's ID number, which is already displayed in the Manage Admin Panel.

  3. Lorelle
    Member
    Posted 4 years ago #

    Neat idea. So it looks up the ID and reports the permalink in the link. Hmmm. That might work if I can't do the other.

    Thanks!

  4. Lorelle
    Member
    Posted 4 years ago #

    mdawaffe:

    I gave it a try - installed RunPHP and then put in the get_permalink(72) and I can't get it to work. Can you check the php to see if you posted it right. This sounded like a great solution to my problem, and I even took the time to figure out how to do a search and replace in MySQL to put this into action, but I can't get my test run to work. Comes up POST NOT FOUND.

    I don't have permalinks installed right now cuz I'm still customizing it, so this might be the prob.

  5. mdawaffe
    Member
    Posted 4 years ago #

    Lorelle:

    <a href="<?php echo get_permalink(156); ?>">movie screening</a>
    is the exact code I'm using on my site (check it out - it's the first post at the moment - just find the "movie screening" link and you should get taken to a post from May).

    You could try:
    <a href="<?php echo get_permalink('156'); ?>">movie screening</a>
    (notice the single quotes around the number). Either should work fine, though.

    I assume that since you're getting the "post not found" message, that you've remembered to check the "eval() content" box :), so I would bet that it's your permalink settings not being set. Though when I unset mine, everything still works. So I don't know.

    Can you post your test run? Perhaps I'll be able to get a hint from the HTML (more likely not, but it's something to try).

  6. Lorelle
    Member
    Posted 4 years ago #

    Thanks for the offer of testing. It's not up and running publicly yet. I'm sure its the permalinks. I tried it with the quote marks and got nothing, too. Out of curiosity, the instructions for the plugin say to post, save, then edit (then put the php link in???), and only mentions the eval() as something separate, or at least implies it.

    So what is the sequence you use to get this to work.

    MEANWHILE...anyone who knows how to put the post-slug in the MANAGE/EDIT screen would be loved and adored forever!

  7. mdawaffe
    Member
    Posted 4 years ago #

    Huh. I just do it all at once. When you first write a post, you have to click the "Advanced Editing" button to get the "eval() Content" checkbox to appear. If you subsequently edit a post, the checkbox should be there by default.

  8. Lorelle
    Member
    Posted 4 years ago #

    I'll keep wacking away at it until something better comes along. I have advanced editing set by default. Thanks for making it easier than the instructions!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.