WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Mystique theme widgets not working if blog is in different directory than WP (9 posts)

  1. Nos402
    Member
    Posted 4 years ago #

    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?

  2. Micah Cooksey

    Posted 4 years ago #

    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?

  3. Nos402
    Member
    Posted 4 years ago #

    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.

  4. Micah Cooksey

    Posted 4 years ago #

    Oh, I see. Thanks. Which widgets?

  5. Nos402
    Member
    Posted 4 years ago #

    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.

  6. huggie
    Member
    Posted 4 years ago #

    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

  7. Micah Cooksey

    Posted 4 years ago #

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

  8. huggie
    Member
    Posted 4 years ago #

    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.

  9. Nos402
    Member
    Posted 4 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic