Forums

[resolved] Wordpress front end, shopping cart in subfolder but keeping sidebar? (3 posts)

  1. richarduk
    Member
    Posted 1 year ago #

    OK, the setup I'm working out is a basic WP install. Within the root there'll be a folder containing a shopping cart (say, 'store') - ecommerecetemplates

    I want to be able to have posts, display products as and where I wish using WP. That's easy. Then, if people want to go to the store from a post, I'll create manual links to the purchase page within the store.

    The bit I don't understand is, how can I maintain WP sidebar tags within the store - for example, <?php wp_list_categories('title_li='); ?> etc.

    Do I put wp-blog-header in the tops of all the pages ? That seems to be for a previous version of WP.

    Thanks!

  2. richarduk
    Member
    Posted 1 year ago #

    Is it doable to have Wordpress in the root AND aspects of it (e.g. the sidebar) functioning in a subfolder?

  3. richarduk
    Member
    Posted 1 year ago #

    This is probably my answer

    This line:
    define('WP_USE_THEMES', false);
    is unnecessary. You don't need to explicitly define it false. It doesn't hurt, but it doesn't help either.

    And this line:
    require('./wp-blog-header.php');

    Assumes that WordPress is installed in your current directory. The single dot is the current directory path. If you have it in a different directory, you need to specify the path to it.

    Say your PHP page is /public-html/test/page.php. And your wordpress is installed in /public-html/wordpress/. In that case, you'd need to have this line:
    require('../wordpress/wp-blog-header.php');

    See? You have to tell it where the file is. The .. is the previous directory. You can also use the full complete path to the file, if you know it.

    From Otto42 here http://wordpress.org/support/topic/148255?replies=3

Topic Closed

This topic has been closed to new replies.

About this Topic