• Resolved Ryan Fitzer

    (@ryanfitzer)


    When I create a static page outside of the directory I’m getting errors when trying to include the footer and header. It cannot find the dynamic info (blog name, copyright, etc…) and therefore fails to display the content (template included) correctly. Any thoughts?

Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter Ryan Fitzer

    (@ryanfitzer)

    All the pages I want to make are in the wordpress directory (sorry for not making that clear in my first post). What I want to do is be able to manually create pages that display a gallery of images (I’m very specific about how that gallery works and do not want to use a plugin). Each page will have a navigation system (drop-down menu) that will lead to the other galleries. I’m basically creating a sub-site to my worpress site.

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    That’s without the drop-down.

    ladydelaluna

    (@ladydelaluna)

    Well yeah… your very first post said, “When I create a static page outside of the directory I’m getting errors…” so that’s why I was lead to believe what I did.

    I guess what I’m not understanding is why you just don’t create a page template just for the galleries… and then make the template do whatever you want it to? You can customize the sidebars and everything just by creating additional ones, and placing them in that specific page template. Then you can use the editor (on the HTML window, perhaps?) to enter your code for the gallery like you want it, without having to build a separate .php page every time.

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    Sorry. I meant outside my theme’s main directory. Each page will have it’s own folder (with an images and thumbs folder inside) which will be located in the theme’s folder.

    All the image and thumb paths are so simple and I would like to keep it that way (images/1.jpg, thumbs/1.jpg). I could keep the page in the theme’s root but then I would have to change every path in the code each time I want to set up a new gallery. I tried to have the main page in the theme’s directory and just do an include () for the content. Everything worked except for the images the images.

    moshu

    (@moshu)

    Are you saying you are putting physical files in the theme’s directory? I am not sure that’s the best practice. What if you are going to change the theme?
    Wouldn’t make more sense to have those files in the WP’s root?

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    I agree with you and have no preference as where they are located. This site is for a friend who will not be changing his theme. If he did I would just create the same thing into the new themes folder and with it’s look and feel. That way he could go back and forth.

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    So I guess I’m at the point now where I’m trying to an include() of a file without changing any of that file’s relative links to images. As it is right now, I can get all of the text to show but none of the thumbs or images. You can see it here. You can also click around on the broken thumb links and the javascript functions correctly (the titles change). How do I do this without changing the paths to the images and thumbs? And thank you so much for everyones help sa far.

    moshu

    (@moshu)

    Oh, I see now. The problem is: incorrect path.
    You have this in your code:
    <img src="images/1.jpg" id="placeholder" />
    but this way you are saying that the /images/folder is in the main=root directory of your WP install, so the browser is looking for the images here:
    https://ryanfitzer.com/wordpress/thumbs/7.jpg
    which obviously is NOT correct.
    What is exactly the path to the “images” folder?
    Is it /wordpress/wp-content/themes/Blix/…and-what?

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    The path is /wordpress/wp-content/themes/Blix/2005/images. But I don’t want to change the path in the code because that would mean changing 48 lines of code everytime I create a new gallery. I’ve set this code up in a generic manner because it works well in production. It’s easier to set up the folder structure to use the code than the other way around. This has worked like a charm on this site. Navigate to the exhibitions page and choose one of the most recent exhibitions. This keeps everything organized beautifully. I name everything in a generic manner (1.jpg, 2.jpg, etc…) and then drop things in the correct folder structure, and violá. I hope you can see why I wouldn’t want to change such a good thing.

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    Ok, so I have given up trying to figure out a php solution. I think the best method will be to create a mini site and then put it in a wp page via an <iframe>. I’ve looked all over and this does everything I want and is much easier to maintain (I used it before on other sites and I have no idea why I didn’t think of it sooner). If anybody knows of any glitches this might cause, let me know. Thanks for everyone’s effort.

    ladydelaluna

    (@ladydelaluna)

    iframes are horrid.
    i mean… horrid.
    not all browsers support them. not all visitors support them.
    and search engines hate them.
    iframes are horrid.

    you need to make a few concessions i think. changing the path in the code is worth the effort and time if your only other choice is using iframes.

    did i mention? iframes are HORRID.

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    Well, crap! I guess I will have to change the paths until I figure out the php problem. I need to get this thing done. Thanks for the heads-up.

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    So I just ended up using the <iframe> element to get the job done. I know it’s not the best solution but damn, it sure does get the job done. I’m going to be working on a better solution in the future and I post it when I figure it out. Maybe a plugin or something. Still learning about all that. Thanks for your help. Here’s where I used the <iframe>

    https://chrisjagers.net/wp/?page_id=61

    Thread Starter Ryan Fitzer

    (@ryanfitzer)

    I have realized that the normal way (I wanted some magical, easy way) to do this is to simply hard code the links. 5 months ago I had no clue and was brand new to WP. Thanks for all your time.

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘including dynamis info outside of directory’ is closed to new replies.