Support » Fixing WordPress » Load new posts while still displaying others

  • Hi,

    I’m doing a page for a job and I need help for a complex (for me) setup.
    The idea is have a static number of posts which will be used as normal pages related to several issues of the enterprise. This way, client can edit itself some contents avoiding the need of continuous actions for the designer-developper. So it’s not an standard blog installation, but at a glance nor difficult too.

    Second issue is that some posts are related to A subject while the rest are related to B subject. Posts related to A subject should load at the left area of the page, while posts related to B subject should be loaded at the right. Until now there’s no problem, playing with loops, categories and so do the job.

    But there’s more. As said, I want only to show two posts at once, one A type post and the other B type post in their corresponding areas. The problem is that when i click to a link in order to load A post, for example, B post disappears, or viceversa according how the loop and if-else’s are configured.

    So I thought my problem may be related to loading dynamic content through AJAX, but I hope there’s another solution because I have no idea about AJAX nor PHP relevant skills. As you probably guess, I’ve read documentation about multiple loops and category-template custimization, but i think the solution comes not (only) by this means.

    I hope to be explanatory and to find a solution… I’m so tired after a month of googling 😉

    Some ascii art can help

    link A 1   link A 2    link A 3   |    link B 1    link B 2
                    |                  |       |
                  load here            |      load here
                   A post              |       B post
                  while keeping B      |      while keeping A
                  on place             |       on place


Viewing 4 replies - 1 through 4 (of 4 total)
  • Without using AJAX-type stuff, the only way to do that is to preserve state information somehow: Storing which B article you’re at in a cookie or in the URI query string so that it knows which to load if you click to a different A article. That’d be the “proper” way to do it. Or you could use frames, the quick & dirty way to do it.

    Hi sojweb,

    Thanks for your answers. I have thought yet about storing current article on a variable or a cookie as you said, but my php skills are not enough for realise how to do it. But i think that I want is not so rare in order nobody has tried it before.

    If you can refer me to some web tutorials or so in order to learn how to do it, via cookies or via URI “generation”, this will be great. In the other side, I not discard the AJAX way, but i need resources, too. Anyway thanks for your help.

    Raimon, Have you looked into using JavaScript sliders to achieve this functionality? You would need to modify the script to remove the sliding transition effect, but it sounds like it would get you going in the right direction..


    if someone was waiting for my responses, sorry about. Thanks specialk for your suggestion, I have followed it and more or less I have solved my problems. I have used Niall Doherty’s Coda-Slider, wich seems the most reliable and easy to adapt to different needs.

    For those who are going to deep in, first keep in mind that Coda Slider doesn’t work properly with links pointing to different coda-slider frames, as my first idea was. Instead, you should keep an standard index.php or single.php post displaying (in the left area, for example) while coda-slider frame (in the right area, for example too) serves as an eyecandy but also practical way to load simultaneous posts.

    Soon or later I will write some tutorial or hints about my own periple and if possible I will post links here. Thanks to all,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Load new posts while still displaying others’ is closed to new replies.