Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter beccaC

    (@beccac)

    Oops, just realized I didn’t include the While loop in the code–which is the part that seems to be creating the problem. Can someone please tell me what’s wrong with my code. Thanks.

    //* Register a widget area called ‘newsbit_widget’
    genesis_register_sidebar( array(
    ‘id’ => ‘newsbit_widget’,
    ‘name’ => __( ‘Newsbit widget area’ ),
    ‘description’ => __( ‘This is where newsbits go’ ),
    ) );

    //* Hook newsbit_widget area after other sidebar widgets
    function add_newsbit_widget() {
    $args = array( ‘post_type’ => ‘newsbit’, ‘posts_per_page’ => 10 );
    $custom_loop = new WP_Query( $args );
    if ( $custom_loop->have_posts() ) {
    while( $custom_loop->have_posts() ): $loop->the_post();
    echo ‘<li class=”widget newsbit_widget”>’;
    echo ‘<h3>Newsbits</h3>’;
    the_title();
    echo ‘<div class=”entry-content”>’;
    the_content();
    echo ‘</div>’;
    endwhile;
    wp_reset_query();
    echo ”;
    echo ”;
    endif;
    }
    add_action(‘thesis_hook_before_sidebar_1′,’widget_featured_posts’);

    I’m also having problems with my Permalinks after moving a local site to a remote server. The problem, I think, has to do with the way my server host handles URLs. The actual files (it’s a test blog for a client, which I’ve put inside my own domain) are at:
    http://www.rhcvisualwriting.com/html/clients/jt/
    but the URL is:
    http://www.rhcvisualwriting.com/clients/jt/
    The server host drops the /html/ for urls.

    When the Permalinks setting is at default (which WP sees as:
    http://www.rhcvisualwriting.com/html/clients/jt/?p=123)
    the homepage works correctly, but links to pages and posts generate 404s. If I create a custom Permalink setting that drops the /html/ out of the URL, then the homepage is a 404 too.
    Though I’ve set the permissions in my htaccess file to allow group read/write, WordPress still thinks it doesn’t have permission–when I try to do a custom Permalink, it tells me it can’t write in the file, so to paste the code below.

    http://www.rhcvisualwriting.com/html/clients/jt/?p=123
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /html/clients/jt/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /html/clients/jt/index.php [L]
    </IfModule>

    Because of the /html/ directory problem, I’m not sure WP is even generating the right code. So I tried changing the rewrite rule to
    RewriteRule . /clients/jt/index.php [L]
    Didn’t make any difference.

    Is there a clue in the fact that on the Permalinks Settings page, there are these two error messages:

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h05/mnt/33146/domains/rhcvisualwriting.com/html/clients/jt/wp-admin/options-permalink.php on line 141

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h05/mnt/33146/domains/rhcvisualwriting.com/html/clients/jt/wp-admin/includes/misc.php on line 133

    I looked at those files/lines, and they refer to user permissions.

    Any help will be greatly appreciated!
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)