Support » How-To and Troubleshooting » Mini Loop Php Syntax HELP!

Mini Loop Php Syntax HELP!

  • Hello,

    I’ve tried my best but the php syntax is a killer (noting like MEL). I’m a cg guy and don’t know .php syntax.

    Anyway, problem is my mini loop. It has this indentation that I absolutely don’t know how to get ride of.

    Please see this screenshot (the green arrows point to the problem areas).

    Is this indentation caused by the style, or the code in the blog_mini.php document?

    Hoping a .php savvy dude can kick some advice! Thanks.

    Here is the code in my blog_mini.php document

    <base target="_blank" />
     <link rel="stylesheet" type="text/css" href="http://www.mohan-conceptual.com/images/style_blogMini.css">
    $how_many=25; //How many posts do you want to show
    require_once("./blog/wp-config.php"); // Change this for your path to wp-config.php file ?>
    <ol id="whats-new">
    $news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code> FROM $wpdb->posts
    WHERE <code>post_status</code>= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
    foreach($news as $np){
    printf ("<li><a href=\"blog/index.php?p=%s\">%s</a></li>", $np->ID,$np->post_title);
    <p align="left"><a target="_blank" href="http://www.mohan-conceptual.com/blog"><b><u>More CG news></u></b></a></p>

Viewing 2 replies - 1 through 2 (of 2 total)
  • We’ll never know without a real link to observe, but I’d wager the issue is style/CSS.

    that test page was taken down, sorry.

    I actually found that by replacing the <ol><li></li></ol> tags solved the indentation issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mini Loop Php Syntax HELP!’ is closed to new replies.
Skip to toolbar