WordPress.org

Ready to get started?Download WordPress

Forums

get_template_part with Ajax? (1 post)

  1. Patrick Daly
    Member
    Posted 3 years ago #

    How might I go about using Ajax to load a get_template_part() call?

    So <?php get_template_part( 'feed-rss' ); ?> obviously loads the file feed-rss.php properly. The problem I'm facing is that the file takes such a long time to load because its parsing an RSS feed. So I'm looking into Ajax solutions that don't require mangling the templates too much.

    Using's jQuery's .load() I can successfully load the file into the page (but not using get_template_part()), but it doesn't load the feed I'm parsing with fetch_feed().

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic