Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a client that wants the ability to remove or add a special offer from the front page of her website.

I thought of creating a custom loop using a featured image etc, which would display the latest special offer.

Her site is a PHP site right now without any WP functionality.

What is the minimum installation that would allow me to display this loop. Instead of creating a theme and template I just want to use the existing page.

Thanks.

share|improve this question
1  
can't you just used a sticky post? I've done this before and worked fine –  andresmijares25 Feb 2 '12 at 16:58
add comment

2 Answers

up vote 1 down vote accepted

You can require the wp-load.php file in the existing page...

<?php require('wp-load.php') ?>

This will basically load the WordPress installation and allow you to access each of the functions (and the loop) as you normally would.

share|improve this answer
    
Phil, so do I load the rest of the WP files in the root directory? And what would I do with the existing index.php file? This is the page I need the functionality. Just use my existing file and add this require? –  jw60660 Feb 7 '12 at 14:10
add comment

Use a normal WP install, attach a theme that consists of nothing than

  • style.css
  • functions.php
  • index.php

Inside your index.php include everything from your current site. Then add the loop where you need it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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