missing wordpress dynamic data in custom child theme (1 post)

  1. onebitrocket
    Posted 3 years ago #


    Here's my problem: Certain wordpress driven dynamic information is missing from the single post pages when I view a post article. This includes the recent posts, side menu and the author information. The missing information displays on all other page types including search, categories and tag

    I have a customised wordpress child theme based on twenty-eleven. The wordpress blog is situated in a divisional sub-folder on my site.

    e.g. http://devsite.mysite.com/division/blog/

    One of the criteria of this wordpress theme is for it to look as though it is part of the site divisional site it is sat in, and fit in completely with the overall site look and feel

    To achieve this I have modified the get_header();, get_sidebar();, and get_footer() files to to work using include('header.php); etc. I changed the get_sidebar()(for example) function didn't execute dynamic php server requests for data stored in a mysql database. Sidebar for example, has an divisional site news include, which pulls the information from the mysql database

    Each of these include files call a domain level or divisional level php include file such as the division menu structure file, this would be at http://devsite.mysite.com/division/includes/division-main-nav.php all my includes are called using $_server['document'_root']

    include($_SERVER['DOCUMENT_ROOT'] . '/division/includes/include-filename.php');

    Some of these includes have their own specific variables set, such as $activemenuclass.

    The index page has the following declared immediately after the opening comments

    require_once( $_SERVER['DOCUMENT_ROOT'] . '365/includes/default-wp.php'); 
    $activemenuclass = 'blog';

    my default-wp.php file has the require_once for my php connections file and the following variables declared in it

    require_once($_SERVER['DOCUMENT_ROOT'] . '/Connections/databaseconnectionfile.php');
    $divisionid = 4; // DIVISION ID
         $division = div; // DIVISION 3 LETTER CODE
    $division_name = 'Division Name'; //DIVISION NAME
    $division_url = 'http://devsite.mysite.com/division/'; // MAIN URL
    $root = '/div/';
    $bloglink = '/div/blog/';
    $blogname = 'Blog';
    $linkedinlink = 'http://www.linkedin.com/company/#';
    $twitterlink = 'https://twitter.com/#';
    $facebooklink = 'http://www.facebook.com/#';

    I'm wondering if there could be conflict between any of these the php variables and wordpress variables.

    I also wondered if it was to do with the folder structure level wordpress writes using htaccess for single post pages, otherwise I'm baffeled.

    I hope this all makes sense. I'll try and add more info if required.

    Is there a better way to load include files into a wordpress theme

    Thanks so much for any input on this

Topic Closed

This topic has been closed to new replies.

About this Topic