WordPress.org

Forums

how to make a script run in a wp post?? (4 posts)

  1. inq
    Member
    Posted 2 years ago #

    hello
    wondering how to get an existing webpage script to run in a wp single post??

    The script itself simply rotates a group of pics in random order on the existing website page.......
    I wish to redo this effect in a wp single post and so:
    wish to find wp equivelent folder/path relation/structure in wp

    webpage relation = this:

    A. make a folder, for instance: .../rotating image page

    B. make an index page for it and pop two snippets in it:
    1. <?php include('rotator.php'); ?> placed after 'head' and before 'body'
    2. <?php some info about place images here ;?> placed in 'body'

    C. THEN IN THIS SAME FOLDER PLACE THE THREE THINGS:
    1. myimages.ini (file)
    2. rotator.php (file)
    3. images (folder)

    Q: how can i repeat the set up.... the same relation structure, so that instead of the website page (index) showing the rotating images....
    I get a wp post (single post) showing the rotating images

    Thoughts would be great.... thanks very much

  2. Florence
    Member
    Posted 2 years ago #

    Yeah I had the same problem. I wanted a custom look for just one page so I created a custom post type and edited the template of that. Worked great for me, but it's probably not the best solution.

  3. inq
    Member
    Posted 2 years ago #

    Hi Florence
    Thanks for thought

    A custom style post sounds an interesting angle.... Am nosing at the wp template codes to see any possibilities.... havn't worked out what to adapt yet,

    existing webpage has 'head' and 'body' on... index.php
    desired wp post is just 'content' (i think) on... single.php

    trying to think how the script would look for single.php instead of index.php

    cheers

  4. Florence
    Member
    Posted 2 years ago #

    Just try it out! Good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.