1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

PHP help for wordpress

Discussion in 'Web Design & Development' started by mwdesign, Jul 2, 2012.

Thread Status:
Not open for further replies.
  1. mwdesign

    mwdesign Thread Starter

    Aug 20, 2010
    Hi, i am trying to create static pages on wordpress because the client needs a custom design. I am having trouble trying to code a blog post system using wordpress almost like a CMS where the user can login and write a post, which then shows up on the static page. I have researched how to do it but have failed to find a clear tutorial on how i can code a post system with an archive etc on dreamweaver.

    This link shows how other people have done but to someone who doesnt know php it makes no sense. I realise that you have to use php to define the title, date, content, read more button, comments etc. But am unsure how to go about doing it.

    Any help will be great, Thanks


    I need to know how to implement my html divs so that when anything like a title or content is entered on wordpress then it updates automatically. I have created a html design which hods my div content for the posts.

    <?php /* Template Name: Home Page 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    <link rel="stylesheet" href="News.css">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="tinyslider2/script.js"></script>
    <link rel="stylesheet" href="tinyslider2/style.css" type="text/css" />
    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-393684-3']);
    _gaq.push(['_setDomainName', '.scriptiny.com']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </head><body onLoad="MM_preloadImages('Images/twitter_bird_roll.gif','Images/linkedin_roll.gif','file:///C|/Users/Marc/Desktop/(MARC) INTER-RESOLVE/MR Website/Images/News feed Images/arrow_left_roll.png','file:///C|/Users/Marc/Desktop/(MARC) INTER-RESOLVE/MR Website/Images/News feed Images/arrow_right_roll.png','Images/News feed Images/car-insurance-comparison-site.jpg')">
    <div id="container">
            	<img src="images/yellow_strip.gif">
                <ul id="social">
                	<li id="twitter" title="Twitter"><a href="http://twitter.com/#!/motorresolve"><img src="Images/twitter_bird.gif" id="Image1" onMouseOver="MM_swapImage('Image1','','Images/twitter_bird_roll.gif',1)" onMouseOut="MM_swapImgRestore()"></a></li>
                  <li id="linkedin" title="Linkedin"><a href="#"><img src="Images/linkedin.gif" id="Image2" onMouseOver="MM_swapImage('Image2','','Images/linkedin_roll.gif',1)" onMouseOut="MM_swapImgRestore()"></a></li>
                <div id="clear"></div>
                <div id="logo_banner">
                     	<li title="Enhancing Customer Journey"><p1 class="bullets">= &nbsp<p1>ENHANCING CUSTOMER JOURNEY</li>
                        <li title="Increasing Customer Retention"><p1 class="bullets">+ &nbsp<p1>INCREASING CUSTOMER RETENTION</li>
                        <li title="Improving Broker Income"><p1 class="bullets">+ &nbsp<p1>IMPROVING BROKER INCOME</li>
                        <li title="Reducing Claims Costs For Insurers"><p1 class="bullets">+ &nbsp<p1>REDUCING CLAIMS COSTS FOR INSURERS</li>
                     <a href="index.html"><img src="Images/MR_logo.gif" id="MR_logo" alt="MotorResolve"></a>
                <div id="clear"></div>
        <nav id="nav">
        	<ul id="navlist">
            	<li title="Home" class="arrow"><a href="index.html">Home</a></li>
                <li title="Services" class="arrow"><a href="Services.html">Services</a></li>
              <li title="About Us" class="arrow"><a href="About Us.html">About Us</a></li>
                <li title="News" class="bcrumb"><a href="News.html">News</a></li>
                <li title="Contact Us" class="arrow"><a href="Contact_Us.html">Contact Us</a></li>
    <div id="About_banner">
    <img src="Images/industry_changing.gif">
    <!-- Post content -->
    <section id="wrapper_posts">
    <div id="post">
         <div id="info">
            	<li id="date">July 28th 2012</li>
            	<li id="names">Amal Ahmed</li>
                <div id="title_post">       
            	<p>ABI reveals new chairman!</p>
                    <div id="comments">(2) comments</div>
        <div id="content">Mr Thiam, group chief executive of Prudential, will take over from Tim Breedon of Legal & General following the completion of his two-year term on 3 July.
    Director General of the ABI Otto Thoresen praised Mr Thiam as a "globally-recognised business leader" whose understanding of the global insurance industry will be a huge asset.
    He said: "I am looking forward to working with him to deepen the impact of the ABI as the authentic voice of an industry that is such a critical part of the UK's economic well-being.
    <!-- side bar which holds newsletter links -->
    <div id="details">
    <div class="col_1">
    	<ul id="list">
    		<li>Mediation to the rescue</li>
            <li>Claims industry is changing</li>
            <li>Is your business prepared for change?</li>
    <div id="clear"></div>
    <div id="footer">
    <hr style="width:925px; border-bottom:1px solid #eee; border-top:1px solid #555; height:0px; margin-left:18px; margin-top:10px; margin-bottom:5px;">
    <div id="footer_logos">
    	<ul >
       	  <li class="logoimg1"><img src="Images/footerlogo1.gif"></li>
          <li class="logoimg2"><img src="Images/footerlogo2.gif"></li>
          <li class="logoimg3"><img src="Images/cle.gif"></li>
    <div id="footer_no">
                     	<li class="footer_web" title="Get in touch">0845 459 6789<br>motorresolve<span class="bullets">.com</span></br></li>
    <hr style="width:925px; border-bottom:1px solid #eee; border-top:1px solid #555; height:0px; margin-left:18px; margin-top:10px; margin-bottom:5px;">
    <div class="disclaimer">
    		<p>© 2012 Enterprise Rent-A-Car Company and InterResolve Holdings Ltd. Composite Legal Expenses Ltd is authorised and regulated by the Financial Services Authority and regulated by the Ministry of Justice in respect of regulated claims management activities Authorisation no. CMR3488, registration recorded at www.claimsregulation.gov.uk </p>
    <!-- FOOTER END -->
    <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
    <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/motorresolve.json?callback=twitterCallback2&amp;count=4"></script>


    /* CSS Document */
    * {border:none; border-style:none; outline:none;}
    html, body {background-image:url(Images/bground_grey.gif); background-repeat:repeat; margin:0; padding:0;}
    #container {margin-left:auto; margin-right:auto; margin-top:0px; padding:0 0 0 0; width:960px; height:auto; position:relative; padding-bottom:30px; background:#fff; z-index:0;}
    ul#list {
    #list li  { 
        padding-left: 3px;
        text-indent: -.7em;
    	border-top:0.5px solid #eee;
    #list li:before {
        content: "&#9632;";
        color:#FC0; /* or whatever color you prefer */
    #social {margin-left:15px; margin-top:5px;}
    #social li {float:left; font-family:"HelveticaNeueLT Com 97 BlkCn", "Arial Black", serif; color:#333; list-style:none; width:30px; height:30px; padding:0 10px 0 10px; margin:0;}
    #twitter {margin:0 0 0 0; padding:0 20px 0 0;  border-right:solid thin #ccc;}
    #linkedin {margin:0 0 0 0; padding:0 20px 0 0; border:none;}
    #clear {clear:both;}
    #MR_logo {float:right; margin: 33px 50px 40px 0;}
    #logo_banner ul {float:left; margin-top:35px; line-height:1em;}
    #logo_banner li {list-style-type:none; margin-left:23px;}
    p1 {font-family:"HelveticaNeueLT Com 97 BlkCn", "Arial Black", serif; color:#4E4947; padding-left:-15px; list-style-type:none; font-size:18px;}
    .bullets {color:#FC0; font-family:"HelveticaNeueLT Com 97 BlkCn", "Arial Black", serif; padding-left:-15px; list-style-type:none; font-size:23px;}
    #nav {padding: 0; font-family: "Helvetica", Helvetica, Arial, sans-serif; text-align: right; margin: 10px 0 4px 18px; position:relative; width:925px; height:30px; color:#fff; font-weight:bold;}
    #navlist {height:30px; color:#fff;}
    ul#navlist {list-style: none; padding: 0 0 0 0; margin: 0px; border-bottom:3px solid #4E4947;}
    #navlist li {border-right:1px solid #eee; width:184px;}
    ul#navlist li {text-align: left; float: left; height: 30px; margin: 0 0 0 0;}
    ul#navlist li a {display: block; padding: 7px 0px 0px 5px; font-size: 13px; text-decoration: none; width: 180px; color:#4e4947;}
    ul#navlist li a:active, {border-bottom:#FC0 3px solid; width:180px; height:23px; display: block; padding: 7px 0px 0px 5px; background-color:#4E4947;}
    .bcrumb {border-bottom:solid 3px #fc0; background-image:url(Images/link_arrow.gif);  background-repeat:no-repeat; background-position:right; width:180px;}
    ul#navlist li.bcrumb a {height:30px; width:180px;}
    ul#navlist li.bcrumb a:hover {color:#4E4947; width:180px; height:23px; padding: 7px 0px 0px 5px; background-color:#fbfbfb; background-image:url(Images/link_arrow_hover.gif); background-repeat:no-repeat; background-position:right; border-bottom: 3px solid #fc0;}
    .arrow {background-image:url(Images/link_arrow.gif);  background-repeat:no-repeat; background-position:right; height:30px; width:180px;}
    ul#navlist li.arrow a {height:30px; width:180px;}
    ul#navlist li.arrow a:hover {color:#4E4947; width:180px; height:23px; padding: 7px 0px 0px 5px; background-color:#fbfbfb; background-image:url(Images/link_arrow_hover.gif); background-repeat:no-repeat; background-position:right; border-bottom: 3px solid #fc0;}
    #banner {margin-left:18px; margin-top:0;}
    #banner ul { list-style:none; margin:0; padding:0;}
    #banner {margin-left:18px; margin-top:-3px;}
    #banner ul { list-style:none; margin:0; padding:0;}
    /* FOOTER */
    #footer {width:960px; height:110px; margin-top:0px; padding:0;}
    #footer_no {text-align:right; width:925px; margin:auto;}
    #footer_logos {float:left; width:300px; margin-left:23px; padding:0; margin-top:5px;}
    #footer_logos li {width: 100px; height:30px; list-style:none; padding:0; margin: 0; float:left;}
    .disclaimer {width:700px; height:30px; font-size:10px; line-height:1.3em; color:#999; float:right; margin:10px 0 10px 0; text-align:right; padding:0 18px 0 0;}
    li.footer_web {
    	font-family:"HelveticaNeueLT Com 97 BlkCn", "Arial Black", serif;
    	text-align: right;
    /* END FOOTER */
    /*NEWS PAGE*/
    #post{width:734px; height:210px; margin-left:18px; float:left; margin-top:0px; padding:0; margin-bottom:70px; margin-left:18px; border-top:2px solid #4e4947; max-height:120px;}
    #post ul li {list-style:none;}
    #info {height:40px; width:120px; background:#4e4947; padding-left:5px; float:left;}
    #date {font-family:"HelveticaNeueLT Com 97 BlkCn", "Arial Black", serif; font-size:18px; color:#fff;}
    #author{font-family:Arial, Helvetica, sans-serif; font-size:9px;color:#fff; font-style:italic; text-decoration:underline;}
    #comments {font-family:Arial, Helvetica, sans-serif; color:#4e4947; font-size:10px; float:left; width:120px;padding-left:5px; margin-top:100px; height:15px; border-bottom:1px solid #999; padding-left:4px;}
    #title_post {width:590px; float:right; font-family:Arial, Helvetica, sans-serif; font-size:20px;color:#4e4947;margin-top:10px; height:40px; margin-bottom:0;}
    #content {margin-top:0px; width:590px; float:right; font-family:Arial, Helvetica, sans-serif; color:#777; font-size:12px; line-height:1.3em; border-top:1.5px dotted #4e4947; padding-top:10px;}
    h3 {font-family:"HelveticaNeueLT Com 97 BlkCn", "Arial Black", serif; font-size:16px; margin-top:5px;}
    h4 {padding-top:10px; font-size:13px; padding-bottom:5px;}
    p2 {font-size:13px; font-weight:bold; text-decoration:underline;}
    .col_1 {float:left; width:165px; line-height:16px; margin-top:15px; height:200px;}
    #list {font-weight:bold; list-style:square; padding-left:10px;}
    #details{width:172px; font-family:Arial, Helvetica, sans-serif; font-size:13px; height:395px; margin:0;  color:#4e4947; float:right; margin-right:18px; padding-left:5px; border-top:2px solid #4e4947;}
    .line_height {line-height:16px;}
    .unbold {font-weight:normal; line-height:1.3em; padding:0;}
    #About_banner {margin-left:18px; margin-bottom:10px;}
    #box_link {height:30px; width:150px; margin-top:10px;}
    #box_link a{color:#4e4947; text-decoration:underline; font-style:italic; font-size:13px; height:10px; margin-top:20px;padding-left:0px; padding-right:3px; height:30px; float:left; width:150px; margin-top:10px;}
    #box_link a:active {color:#4e4947;}
    #box_link a:visited {color:#4e4947;}
    #box_link a:hover {color:#FC0;}
    #box_link2 {height:20px; float:left; width:150px; margin-top:58px;}
    #box_link2 a{color:#4e4947; text-decoration:underline; font-style:italic; font-size:11px; height:10px;}
    #box_link2 a:active {color:#4e4947;}
    #box_link2 a:visited {color:#4e4947;}
    #box_link2 a:hover {color:#FC0;}
    ::-webkit-scrollbar {
        width: 7px;
    ::-webkit-scrollbar-track { width:7px;
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    ::-webkit-scrollbar-thumb { width:10px; background: rgba(78,73,71,0.9); border-radius:5px;
  2. Sponsor

  3. dukevyner


    Nov 4, 2011
    Here's the problem I have... You shouldn't be taking "client's" if you can't do what they want... If you want like word press... But use word press... It's simple css and html changes from there... But if you don't understand php don't take clients that need it... If you really want to look up how to build a blog... It will go over everything... Otherwise use word press and look up make custom word press theme
  4. mwdesign

    mwdesign Thread Starter

    Aug 20, 2010
    well thing is its not a professional client just someone who asked me to make them a wordpress site with a design in mind. I have looked at wordpress codex, but its a mish mash of different code for different things and the problem i have is trying to know where to start. I have succesfully managed to add a static page onto wordpress, and the hardest part for me is coding the post, the rest i can manage. But i guess ill have to keep looking around.


  5. caraewilton


    Nov 7, 2007
    My suggestion would be to use a base template that does what you need and then style the page on top of that. Works well if you not to good at php.
  6. mwdesign

    mwdesign Thread Starter

    Aug 20, 2010
    well ive pretty much done that now, im hosting wordpress locally and have used the twentyten theme although someones recently pointed out that i should create a child theme within it and work from there.

    ive added the home.php file into the theme and a css file for it as well as an images folder (which for some reason isnt displaying any images apart from my background image). But my main issue is adding php around my blog html design and using wordpress as the cms to post from.
  7. colinsp

    colinsp Colin

    Sep 5, 2007
    You can do what you want more easily by using a plugin in Wordpress. Use a theme that allows widget areas on pages like Suffusion which is one of my favourites and free and then use the recent post plugin to display the latest 1 - x posts on that static page. Saves you the heavy lifting and it works.
  8. mwdesign

    mwdesign Thread Starter

    Aug 20, 2010
    i see what you mean...i guess i should have done it on wordpress itself....i didnt want to use a template because i prefer being able to manipulate design aspect myself...ive worked with pagelines before and had a torrid time trying to change design elements via custom code.I didnt think it would be difficult to implement wordpress plugins into a custom design. Hhaha....well for this case as i have already completed html designs i will try to pursue the static page method...and will use wordpress itself in future. Thanks for your help. :)
  9. mwdesign

    mwdesign Thread Starter

    Aug 20, 2010
    I have decided to make a new theme and have seperated my html into header.php, index.php, footer.php, style.css, images folder, css folder, and functions.php.

    Im having an issue linking to my stylesheets. I have looked around and i assumed the tag below was correct? i am unsure as to what the full link to the file is? Any ideas?

    <link rel="<?php bloginfo( 'stylesheet_url' );?>http://localhost:8080/htdocs/wordpress/wp-content/themes/twentyelevenchild/CSS/motorresolve.css" type="text/css">

  10. mwdesign

    mwdesign Thread Starter

    Aug 20, 2010
    I have fixed it :) no worries
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1059366