WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks and flash content (i dont want absolute paths) (2 posts)

  1. treewhisperer
    Member
    Posted 5 years ago #

    Hi everyone,

    I really like permalinks (they look nice and are good for SEO)
    Well I got this problem since I will be posting a lot of flash content and I really like to use relative paths.

    Now my flash content isn't showing because the path to the flashfile is not absolute. :( And even when I would make it a absolute path, I would have to change all the paths within my flash files, because they all load external data. :(

    I really like to know if theres a plugin or some way to fix this.

    thx in advance

  2. Doodlebee
    Member
    Posted 5 years ago #

    the relative path doesn't work because WordPress pulls in information from the database, not from the filesystem. If you have your .swf file places in your theme's "images" folder, then the actual full path would be "yoursite.com/wordpress/themes/your_theme/images/file.swf". Relative paths are based on the URL of the page you're on - so if the .swf file is on the "about" page, and you have pretty permalinks set, and you're using a relative path, WordPress would look for that file in "yoursite.com/about/images/" - but it's not here. Thus the dilemma of dynamically-generated content :)

    If you can supply the dynamic variable that supplies the path for you then you can just use <?php bloginfo('template_directory');?> which will provide the full, actual path to the themes directory you are using. So to use `<?php bloginfo('template_directory');?>/images/file.swf' will provide the correct URL for your files.

Topic Closed

This topic has been closed to new replies.

About this Topic