Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6994783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:56:09+00:00 2026-05-27T19:56:09+00:00

This is my first major WordPress site from absolute scratch. My PHP skills are

  • 0

This is my first major WordPress site from absolute scratch. My PHP skills are only starting out and this is the error I am getting. I know what the problem is, I just don’t know how to write this block of PHP code correctly and would appreciate some help please.

As far as I have read, I cannot put html markup into a block of PHP code like I have done here which is odd, as all the example WP Loops I have seen has HTML markup in it.

            <?php
            /**
             * Template Name: Home Page
             *
             * This Full Width template removes the primary and secondary asides so that content
             * can be displayed the entire width of the #content area.
             *
             */


                // calling the header.php
                get_header();

                // action hook for placing content above #container
                thematic_abovecontainer();

            ?>

                    <div id="container">

                        <?php thematic_abovecontent(); ?>

                        <div id="content" class="home-content">

                            <?php

                            // calling the widget area 'page-top'
                            get_sidebar('page-top');

                            the_post();

                            thematic_abovepost();

                            ?>

                            <div id="post-<?php the_ID();
                                echo '" ';
                                if (!(THEMATIC_COMPATIBLE_POST_CLASS)) {
                                    post_class();
                                    echo '>';
                                } else {
                                    echo 'class="';
                                    thematic_post_class();
                                    echo '">';
                                }

                                // creating the post header
                                // thematic_postheader();

                                ?>

                                <div class="entry-content">

                                    <?php

                                    the_content();

                                    wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'thematic'), "</div>\n", 'number');

                                    edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>') ?>

                                </div>
                            </div><!-- .post -->
                            <div class="featureBlocks">
                                <div class="news">
                                    <div class="featTitle">
                                        <h3>News <br />& Events</h3>
                                        <div class="featSubTitle">What's happening in the world of Process Engineering</div>
                                        <div class="clear"></div>
                                    </div>
                                    <?php 
                                        query_posts('cat=4&posts_per_page=1');
                                        if (have_posts()) : while (have_posts()) : the_post();
                                            the_title();
                                            the_content();
                                            /*<a href='<?php the_permalink(); ?>' rel='bookmark' title='Permanent Link to <?php the_title_attribute(); ?>'><?php the_title(); ?></a>*/
                                        endwhile; endif;
                                        // Reset Query
                                        wp_reset_query();
                                    ?>
                                </div>
                                <div class="research">
                                    <div class="featTitle">
                                        <h3>Research <br />Highlights</h3>
                                        <div class="featSubTitle">Find out what exciting research is happening Process Engineering</div>
                                        <div class="clear"></div>
                                    </div>

                                    <?php 
                                        query_posts('cat=5&posts_per_page=1');
                                        if (have_posts()) : while (have_posts()) : the_post();
                                            <strong>the_title();</strong>
                                            the_content();
                                        endwhile; endif;
                                        // Reset Query
                                        wp_reset_query();
                                    ?>
                                </div>
                                <div class="studentStories">
                                    <div class="featTitle">
                                        <h3>Student <br />Stories</h3>
                                        <div class="featSubTitle">Student life at the Department of Process Engineering</div>
                                        <div class="clear"></div>
                                    </div>
                                    <?php 
                                        query_posts('cat=6&posts_per_page=1');
                                        if (have_posts()) : while (have_posts()) : the_post();
                                            the_title();
                                            the_content();
                                        endwhile; endif;
                                        // Reset Query
                                        wp_reset_query();
                                    ?>
                                </div>
                                <div class="clear"></div>
                            </div>
                        <?php

                        thematic_belowpost();

                        // calling the comments template
                        thematic_comments_template();

                        // calling the widget area 'page-bottom'
                        get_sidebar('page-bottom');

                        ?>

                        </div><!-- #content -->

                        <?php thematic_belowcontent(); ?> 

                    </div><!-- #container -->

            <?php 

                // action hook for placing content below #container
                thematic_belowcontainer();

                // calling footer.php
                get_footer();

            ?>

I’d appreciate it if someone could show me what I am doing wronf.
Many thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:56:10+00:00Added an answer on May 27, 2026 at 7:56 pm

    Someone else managed to answer my question on another forum. Kash, I hope this works for you too.

    <?php query_posts('cat=5&posts_per_page=1');
        if (have_posts()) : while (have_posts()) : the_post();?>
        <strong><?php the_title();?></strong>
        <?php the_content();
        endwhile; endif;
    ?>
    

    Thanks everyone else who pitched in! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first major application using multiple classes. It is written in vb
this my first shot at this awesome new (to me) programmers site, I hope
Code first: '''this is main structure of my program''' from twisted.web import http from
I am working on my first major PHP/MySQL application. I use the Exception handling
I have a major problem getting this to work properly. Here is the deal.
Particularly, 08 and 09 have caused me some major trouble. Is this a PHP
This first bit works: $my_id = 617; $post_id_7 = get_post($my_id); $title = $post_id_7->post_excerpt; echo
Saw this piece of code in a Ruby on Rails book. This first one
problem euler #5 i found the solution but i don't know why this first
Using Dozer to map two objects, I have: /** /* This first class uses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.