0

GOAL Wondering if following should be done, I would like to (ajax?) refresh not necessary only (custom) post type loop or div

example custom post query :

<div class="refreshed posts">
<?php

global $post;

$myposts = get_posts('post_type=employer&numberposts=5&orderby=modified&offset=0');

foreach($myposts as $post) :

setup_postdata($post);

?>
</div>

CONCLUSION

Auto refresh posts can help my website users to see that when for example somebody submits a post type employer entry, at the same moment all online users can see all updated "employer" posts including that one submitted post. I would like to avoid using plugins. In the similar manner uses facebook etc their notifications (I believe they scheduled to refresh in minute intervals)

  • 2
    With the Wordpress 3.6 heartbit Api this should be easier. With current wordpress version you have to play with ajax and setInterval() – gmazzap Jul 29 '13 at 9:41
  • I have installed Wordpress 3.6 Beta version, how can I achieve it with that version? – Daniel Foltynek Jul 29 '13 at 10:42
  • Have you looked at this? – gmazzap Jul 29 '13 at 10:57
  • G.M this is a correct answer pls. answer my question below and I will mark that as correct, thanks to you I have found probably already working plugin which notifies about new posts, it will need some further implementations but it is very good start thanks to you , plugin here link – Daniel Foltynek Jul 29 '13 at 14:36
1

With the Wordpress 3.6 heartbit Api this should be easier.

With previous Wordpress version you have to play with ajax and js setInterval() function.

Edit

@Daniel Foltynek suggest this plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.