Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4310

    When you look on http://www.resave.co.uk/ you see on the right hand side under “ReSave blog” an excerpt from a post.

    On http://www.resave.co.uk/compare-gas-price/ if you look the excerpt does not appear. This page is a PHP template I have created by taking the code from an existing Broadscope template and adding my custom code in the middle.

    I wonder if I have missed something in copying it over that is causing it not to work? Here is the header code I have used:

    <?php

    /*

    Template Name: Compare

    */

    // $db_handle=mysql_connect(’46.252.192.220′,’resaveadmin’,'Xpanding9′) or die(“Unable to connect to database”);

    // @mysql_select_db(“reminders”) or die(“Unable to select database $DBName”);

    global $avia_config;

    /*

    * if the user wants to display a blog on that page do so by

    * calling the blog template and then exit the script

    */

    if(isset($avia_config)) { query_posts($avia_config); }

    /*

    * check if this page was set as a portfolio page by the user

    * in the theme portfolio options

    */

    if($portfolios = avia_get_option(‘avia, portfolio’))

    {

    if(!empty($portfolios[0]) && !empty($portfolios[0]))

    {

    foreach($portfolios as $portfolio)

    {

    if(is_page($portfolio))

    {

    $avia_config = array(“paged” => get_query_var( ‘paged’ ), “posts_per_page”=>-1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘portfolio_entries’, ‘field’ => ‘id’, ‘terms’ => explode(‘,’, $portfolio) , ‘operator’ => ‘IN’)));

    get_template_part( ‘template’, ‘portfolio’ ); exit();

    }

    }

    }

    }

    /*

    * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.

    */

    get_header();

    ?>

    #45818

    Found it now – needed to switch between databases

    #45819

    Glad that you solved the problem :)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Blog posts not appearing in listing’ is closed to new replies.