• I have an existing WP that I am converting over to new website. I am using a template that has space for post on each page and a custom blog.html page. I did not have a function.php so I created one w/ the the following:
    <?php
    add_theme_support(‘post-thumbnails’);
    ?>

    I am not clear on how to embed the what in my html to get the posts pulled and displayed.

    Can you provide html code examples?

    http://wordpress.org/plugins/single-latest-posts-lite/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Thread Starter jneibel@mirroredstorage.com

    (@jneibelmirroredstoragecom)

    Do I embed php code in html or call it from html. Not sure how to do either. Here is my html code w/ php and it produces blank page w/ favicon.

    <!DOCTYPE html>
    <!–[if lt IE 7 ]><html class=”ie ie6″ lang=”en”> <![endif]–>
    <!–[if IE 7 ]><html class=”ie ie7″ lang=”en”> <![endif]–>
    <!–[if IE 8 ]><html class=”ie ie8″ lang=”en”> <![endif]–>
    <!–[if (gte IE 9)|!(IE)]><!–><html lang=”en”> <!–<![endif]–>
    <head>

    <!– Basic Page Needs
    ================================================== –>
    <meta charset=”utf-8″>

    <meta name=”author” content=””>

    <!– Mobile Specific Metas
    ================================================== –>
    <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>

    <!– CSS
    ================================================== –>
    <link rel=”stylesheet” href=”css/skins/default.css”>
    <link rel=”stylesheet” href=”css/style.css”>
    <link rel=”stylesheet” href=”css/skeleton.css”>
    <link rel=”stylesheet” href=”css/responsive.css”>
    <link rel=”stylesheet” href=”css/prettyPhoto.css”>
    <link rel=”stylesheet” href=”css/fontello.css”>

    <!– Oregano font –>
    <link href=’http://fonts.googleapis.com/css?family=Oregano:400,400italic&#8217; rel=’stylesheet’ type=’text/css’>

    <!–[if lt IE 9]>
    <script src=”http://html5shim.googlecode.com/svn/trunk/html5.js”></script&gt;
    <![endif]–>

    <!– Favicons
    ================================================== –>
    <link rel=”shortcut icon” href=”images/favicon.ico”>
    <link rel=”apple-touch-icon” href=”images/apple-touch-icon.png”>
    <link rel=”apple-touch-icon” sizes=”72×72″ href=”images/apple-touch-icon-72×72.png”>
    <link rel=”apple-touch-icon” sizes=”114×114″ href=”images/apple-touch-icon-114×114.png”>

    </head>

    <body>
    <?php get_pages( $args ); ?>
    <?php
    /*
    Template Name: SLPosts
    */
    /* Include header */
    get_header();
    ?>
    <!– Template sub-parent wrapper –>
    <div class=”inner-page”>
    <!– Template content wrapper –>
    <div class=”page-content”>
    <?php

    if( function_exists(‘single_latest_posts_lite’) ) {
    $parameters = array(‘title_only’ = ‘false’);
    single_latest_posts_lite( $parameters );
    echo “Title ” single_latest_posts_lite( $parameters )
    }

    /* Include Footer */
    get_footer();
    ?>

    </body>
    </html>

    Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hi, if you want to embed Single Latest Posts into your current template, then just use the code below:

    <?php
    if( function_exists('single_latest_posts') ) {
           $parameters = array('title_only' => 'false');
           single_latest_posts( $parameters );
    }
    ?>

    Here you’ll find the code embedded into your HTML template: https://gist.github.com/anonymous/6722060

    Be aware you must save it as a .php instead of .html, otherwise it won’t execute PHP code.

    Cheers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New User need help’ is closed to new replies.