WordPress.org

Ready to get started?Download WordPress

Forums

Featured Custom Posts Widget
Permalink Base Not Working With Subdirectory Install (3 posts)

  1. billsmithem
    Member
    Posted 2 years ago #

    The permalink base feature does not work properly if WordPress is installed in a sub-directory but mapped to load from the root. I believe the get_bloginfo() call on line 70 in featured_custom_posts_widget.php should be using 'siteurl' rather than 'wpurl'. I've patched my copy and it works perfectly.

    The way it's being done currently, instead of a permalink base of "/custom_posts" mapping to domain.tld/custom_posts/... you get domain.tld/sub-directory/custom_posts/... which results in a 404 error.

    http://wordpress.org/extend/plugins/featured-custom-posts-widget/

  2. linkhousemedia
    Member
    Plugin Author

    Posted 2 years ago #

    Hi @billsmithem,

    Thanks for bringing this to my attention. I'll include this in the next release. Much appreciated.

    Jason

  3. madhavaji
    Member
    Posted 2 years ago #

    Nice,

    In the mean time I made a quick hack, um.. fix for this.

    I changed line 70 of "featured_custom_posts_widget.php" from..

    $url = $args['permalink_base'] ? get_bloginfo('wpurl').$args['permalink_base']."/".$post->post_name : $post->guid;

    to..

    $url = $args['permalink_base'] ? get_bloginfo('url').$args['permalink_base']."/".$post->post_name : $post->guid;

    All I've done is change get_bloginfo('wpurl') to get_bloginfo('url').

    It'll be nice to remove this when the new version comes.

    Cheers,

    Michael.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic