• Resolved therealex

    (@therealex)


    Hi,
    I’m new to WordPress. My friend had PHPnews for his blog, and his old designer suggested I try WordPress. It’s been a bit of a learning curve over these last couple of days.
    On his present home page, he has a small box that shows the latest blog entry, or at least a few lines of it. Is there any way to do that with WordPress, perhaps with the excerpt box? I guess what I’m asking is, what code would I use that would get the excerpts from the latest blogs (which are in a category called “latest news”) and put them on the front page of his site? It would go into a cell on the table, not spread out on the page, so it would probably wrap.
    Thanks for your help – this is a great site!

Viewing 8 replies - 1 through 8 (of 8 total)
  • First see if evermore can sort your issues. That ways your news website will also look better. Just a thought!

    Thread Starter therealex

    (@therealex)

    Evermore looks great, but it would do it’s thing on the home page of the wordpress section of the site. What I need to find out is how to put the information (and Evermore looks like it would take care of making it excerpts, which is what I wanted) on the home page of the actual full site, of which the WordPress area is only a part.
    When I tried to change it via “settings” – oh boy, was that a mistake! Screwed up the whole structure, and was able to fix it via the database.
    I’m sure the answer I’m looking for is something simple and obvious, I just don’t see it.
    Thanks for the help!

    The SEARCH function is your friend …
    HERE

    Thread Starter therealex

    (@therealex)

    Thanks Saurus, but the home page of ewfanati only has a “latest news” that’s hand-entered, then a link to the forum. I’m looking for code that would actually show the “latest news” category stuff on the main page of the site, not just the main page of the wordpress (blog) section.

    Since I don’t know much about php, I’m not sure how to do that or if it can be done. The workaround is to just list, by hand, the latest news headlines that will link to the actual page. I’m trying to make this easy for my friend Jim, who owns the recording studio and did me a big favor on my new CD.

    I tried adding this line in the table where the old news link was:
    <td><p>SABELLA NEWS

    <div id=”content”>
    <?php include (‘wordpress\wp-content\themes\bytetips\site_main_index.php’); ?>
    </div>
    The file site_main_index.php is a derivative of the original index.php file from the bytetips theme, knocked down to:
    <div id=”content”>
    <?php if (have_posts()) : query_posts($query_string .’&cat=16′); ?>
    <?php while (have_posts()) : the_post(); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>

    <hr><small><b>By</b> <?php the_author() ?> ~ <?php the_time(‘F jS, Y’) ?>. <b>Filed under:</b> <?php the_category(‘, ‘) ?>. <?php edit_post_link(‘(edit)’); ?></small>

    <div class=”entry”>
    <?php the_content(‘Continue reading »’); ?>
    </div>

    <?php endwhile; ?>

    Category 16 is “latest news”, so I thought by using “include” it might work. I thought wrong. On the test page, I got a string of errors, specifically:

    Warning: main(wordpress\wp-content\themes\bytetips\site_main_index.php): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/sabellastudios.com/httpdocs/new_home.php on line 146

    Warning: main(wordpress\wp-content\themes\bytetips\site_main_index.php): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/sabellastudios.com/httpdocs/new_home.php on line 146

    Warning: main(): Failed opening ‘wordpress\wp-content\themes\bytetips\site_main_index.php’ for inclusion (include_path=’.:/usr/local/psa/apache/share/pear’) in /usr/local/psa/home/vhosts/sabellastudios.com/httpdocs/new_home.php on line 146

    new_home.php is the test home page I used. So, is this not working because the path is incorrect? Or have I totally missed it?

    Any help would be greatly appreciated. If you like blues and rock/blues, I’d be glad to compensate with a link where you can download the whole CD!

    – Russ

    to answer an earlier question, yes you can have auto – entered recent posts / whatever, in front of your blog.

    1) one of my sites needed custom programming.

    2) another i was able to just ” copy ” the code for ” recent posts / most popular posts ” from a menu originally set up for the side bar in the blog.

    the 1) example is a bit more complicated to share right now. the 2) example i copied code from index.php code where on my theme recent posts resides and pasted it into a new php template that acts as a ” menu page ” in front of the blog.

    i put the recent posts code in a sidebar via this plugin = http://wordpress.org/extend/plugins/php-code-widget/

    Thread Starter therealex

    (@therealex)

    Well, I’ve tried all the suggestions but still can’t get this to work. The problem is that all of the wordpress stuff is in the wordpress directory, not the root directory. I don’t know how to change the code so that the path will be correct, coming from the main page of the site (the wordpress section works fine!)
    Any thoughts would be very welcome!

    Thread Starter therealex

    (@therealex)

    Got it!!!

    What I had to do was create a new category. Then I created a page in the Themes directory – bytetips, in this case. I called the page category-18.php, as that was the number of the new category. The page had only the content loop – no header, footer, sidebars, etc. I then put an include on the front page of the website:
    <?php include (‘http://www.sabellastudios.com/wordpress/?cat=18&#8217;); ?>

    and bada bing bada boom – there it is!

    Thanks to all for their help.

    i just visited you site and enjoyed the visit. now that you figured your problem out do a little research about ” pretty links ” something your readers will find intuitive.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Link from site home page?’ is closed to new replies.