• Hello,

    I need some help/advise/support with using wordpress theme functions outside of wordpress. Basically I made a javascript widget that shows a countdown for upcoming episode and the problem is i have to edit that widget every week via ftp/etc. Is there any i can use a code like this

    <?php $episode_title2 = get_theme_option('episode_title2'); echo ($episode_title2); ?> inside a javscript file instead of changing it manually every week.

    what do i need to add to the javascript file to make that function work.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Your best bet may be to use jQuery to make an AJAX call to your WP server. You can filter AJAX requests within WP to respond to such requests with the appropriate data. jQuery can then place such a response inside the appropriate HTML element. See AJAX in Plugins.

Viewing 1 replies (of 1 total)
  • The topic ‘Need help, with theme options outside of wordpress’ is closed to new replies.