0

We installed wordpress in a subfolder which is /news but now we want to make some changes to our homepage, which is not inside wordpress. We would like to install a slider wordpress, with a drag & drop feature, and to be able to display it in our very home page. In other words, is there any plugins which allow to do this? We tried revolution slider but it looks like we cant show our slider outside of our subfolder news. I went to many documentation but still cant find my answer.

Any help would be greatly appreciate!

2 Answers 2

0

In a normal WP flow following happens:

  1. Web server get request for pretty permalink (typically) and sends it to index.php of WP installation.
  2. WP core loads and displays a page, respective to that input.

In your case the root of the site points to something different entirely. So there is no WP core load happening.

You could integrate WP into your home page (assuming it is also PHP at least). For that you would have to:

  1. Load WP core yourself (wp-load.php and around).
  2. Figure out how to retrieve data or run functionality you need, without “normal” process of turning URL into page output.
0

I'm not really sure about the slider with a drag and drop feature. Maybe there is a plugin to do that.

As alternative to Rarst method, you can get WordPress content using the admin-ajax handler, and then display it using JavaScript

  1. Create your slider, using any plugin inside wp-admin.
  2. Make an admin-ajax handler to retrieve that data. Hook it into wp-ajax-nopriv-get-slider-for-front-page.
  3. On your home page, add a JavaScript that will make an AJAX request to the admin-ajax handler. The request URL would be http://site-name.com/wp-directory/wp-admin/admin-ajax.php?action=get-slider-for-front-page.
  4. Still on that JavaScript, append the data to the DOM as needed for a slider, and run the slider after loading all the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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