-1

I have a website consisting of html pages but with one blog page in Wordpress. There is a news ticker plugin on this wp page which I would like to embed into the other pages of the site.

How can this be done?

Many thanks in advance.

1
  • 1
    This question probably isn't technically "off-topic" but you're getting downvoted because of how brief and vague the question is. Please review the "How do I ask a good question" and include more details about what you'd tried and what hasn't worked.
    – mrwweb
    Oct 14, 2014 at 16:53

1 Answer 1

0

Well...outside of the fact that you're unable to load PHP in *.html files, let's try to look at this from a different angle here...

One way that this could be done would be to convert all of the *.html pages - that you would like to include the news ticker on - to *.php pages, and to insert a PHP function that loads WordPress in the header of those files, along with the news ticker shortcode or display function.

Another way that this could be done would be to create one .php file in the root of your WordPress installation that only includes the aforementioned PHP function that loads WordPress in the header of that one file, along with the news ticker shortcode or display function, and loading that on the html pages through an iFrame.

Here's the function I referenced above:

To include WordPress in an external .php file, place the following code in the header of the file.

3
  • Thank you Courtney. Including the function in the header and the news ticker shortcode in the html is working in that it's pulling in the content from the WP ticker - but it's not showing the animation, it just lists the news items. ?
    – Paul
    Oct 16, 2014 at 9:54
  • Sounds like the plugin JS is missing. Depending on where it was enqueued in the plugin, adding wp_head() just under the top function and/or wp_footer() at the bottom of the file should pull in any necessary JS. Note: It will pull in ALL of the JS/CSS. Oct 16, 2014 at 15:33
  • I updated the answer above with the wp_head() reference. Oct 16, 2014 at 15:33

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