Support » Themes and Templates » Mystique theme widgets not working if blog is in different directory than WP

  • Resolved Nos402

    (@nos402)


    I have my WP files in a “WP” directory while my main blog is outside that directory in my domain root. This seems to cause the widgets in the Mystique theme to not work. They start to load but then the sidebar just says “Index of /wp” and lists the files. Is there some way I can fix this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Not quite reading you. Are you saying that you have a blog that os integrated with your WordPress site, or that you have a WordPress blog and you moved your wp-content folder somewhere else?

    I have all my wordpress files in heathallyn.com/wp while my blog address is set to just heathallyn.com. I followed the instructions here but could never get the Mystique theme widgets to function properly unless the WP and Blog directories were the same.

    Oh, I see. Thanks. Which widgets?

    The whole sidebar (in which I have the twitter widget and the flexo archives widget) starts to load then just displays “Index of /wp” and shows all the templates. Also if you go to “Mystique Settings” none of the settings pages load.

    OK, I’ve had a look and think I’ve worked it out. It’s an issue with the theme.

    Make sure you backup the following two files as I can’t guarantee that this wont mess something else up as I haven’t had long to test it:

    admin/theme-settings.php
    lib/widgets.php

    Change line 20 in theme-settings.php from this:
    <iframe id="themepreview" name="themepreview" src="<?php echo get_option('siteurl'); ?>/?preview=1"></iframe>
    To this:
    <iframe id="themepreview" name="themepreview" src="<?php echo get_option('home'); ?>/?preview=1"></iframe>

    Change line 380 in widgets.php from this:
    type: "GET",url: "<?php bloginfo('wpurl'); ?>",data: { widget_id: '<?php echo $id; ?>', twituser: '<?php echo $twituser; ?>', twitcount: '<?php echo $twitcount; ?>', get_twitter_data: 1 },
    To this:
    type: "GET",url: "<?php bloginfo('url'); ?>",data: { widget_id: '<?php echo $id; ?>', twituser: '<?php echo $twituser; ?>', twitcount: '<?php echo $twitcount; ?>', get_twitter_data: 1 },

    It works, but I haven’t done a lot of testing.

    Rich

    Thanks huggie. I wondered if it was due to using the wrong bloginfo tag.

    It’s usually the case that when giving WordPress it’s own directory, somewhere along the line someone’s going to get the bloginfo() or get_options() parameters wrong.

    I’ve posted a comment on the author’s site in order to try and get it included in the next version of the theme.

    Awesome! I would try it out but I just went ahead and moved WP into my home directory so avoid the problem. Good to know though!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Mystique theme widgets not working if blog is in different directory than WP’ is closed to new replies.