Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter knitter

    (@knitter)

    I use this link only when the entire context of the category is relevant to the specific post that people should start reading from.

    I have a knitting blog, my gallery of finished objects has links to the last post I made about each object (with all the technical details and best photos) but it is useful to be able to scroll back and see all the posts about that object. However, if I make more than one of those objects then they will all be together in the one category and there will now be more than one potential starting point to view the category, depending on which object caught your eye. If you click on thumbnail for a pink hat and get taken to the top of the category (because the pink hat has fallen off the first page of the category) and can see only brown hats it is very confusing. Does that make sense?

    If I link only to the specific post then readers can’t easily scroll through the archives on that object to see any problems with the pattern I might have overcome in the process.

    I have commented out line 483 of admin-functions.php and solved my problem.

    “$_POST[‘link_url’] = preg_match(‘/^(https?|ftps?|mailto|news|gopher):/is’, $_POST[‘link_url’]) ? $_POST[‘link_url’] : ‘https://’ . $_POST[‘link_url’];”

    I hope this is helpful to anyone else wanting to add relative links. I haven’t tested it terribly extensively so be careful. This will also mean it is entirely up to you to make sure you include the https:// (or whatever) in your links if it is actually needed.

    Has anyone figured out how to do this? I use Links to point to various parts of my own site using relative links (with absolute paths). It is of great importance to me for future compatibility that they NOT contain the “https://domainname”. Internal links should be relative so you can just pick the whole thing up and dump it in a new domain and everything will still work. If I decide to change my domain name one day I DO NOT want to have to edit every internal link in the content to change the domain name, what a headache! All of my external links are obviously absolute urls.

    This was working in previous verions of WP btw, and has only become a problem for me since upgrading.

    I should add that the inability to add relative internal links is not only a potential problem if I change my domain name in the future. It will be a problem every time I want to run a copy of my blog on “https://dev.mydomain.com/” while upgrading, redesigning, etc and want to test adequately.

    knitter

    (@knitter)

    thanks for that! i had figured out how to use id with some fiddling round but hadn’t figured how to show all (other than setting a high limit I knew wouldn’t be crossed). I shall have to rethink my category structure… I had this all working beautifully with Kitten’s plugin, it seems to me that it is not so redundant after all…

    knitter

    (@knitter)

    thanks! any ideas on removing the posts of child categories?

    knitter

    (@knitter)

    I have managed to create the effect that I want using the last example code posted by Ryan in the first part of the advanced use info on the Loop https://codex.www.ads-software.com/The_Loop and it is working but I have to questions.

    1) are there more parameters I can use, in particular to sort the result by name or id?
    2) how do I exclude the posts that are from child categories of the cat I have specified?

    thanks!

Viewing 6 replies - 1 through 6 (of 6 total)