Webmaster Forum

Go Back   Webmaster Forum > Web Development > Web Design Lobby

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.


Closed Thread
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 02-18-2012, 10:00 PM
n_touch's Avatar
Contributing Member
 
Join Date: 09-27-10
Posts: 230
iTrader: 0 / 0%
Wordpress Question

Hello how is everyone doing? I am working on a wordpress site for another company and I am perplexed in how to get my home page to do what I am wanting it to go. As of now the main.php is grabbing posts. What I would like it to do is just grab a content box or constantly grab the same post and not the most recent. If anyone has any suggestions I would be thankful. Here is the code to the main page and where I am working on it for viewing.

www.thesavingsbandit.com

PHP Code:
<?php get_header(); ?>
<div class="container_24">
    <div class="grid_9" id="sidebar-left">
        <div class="indent"><?php if ( ! dynamic_sidebar'Sidebar Left' ) ) : ?>
                    <!-- Widgetized Header -->
                <?php endif ?></div>
    </div>
    <div class="grid_11">
        <div id="content">
        <?php query_posts('category_name=featured&showposts=1'); ?>
           <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
           <article id="post-<?php the_ID(); ?><?php post_class(); ?>>
              <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
             <div class="post-meta">
                <?php the_time('M j, Y'); ?> <?php the_time() ?> Posted by <?php the_author_posts_link() ?>
             </div><!--.post-meta-->
             
              
              <div class="post-content">
                 <div class="excerpt"><?php the_excerpt(); ?></div>
               <div class="post-meta-bot"><a href="<?php the_permalink() ?>">Read more</a><?php comments_popup_link('No comments''One comment''% comments''comments-link''Comments are closed'); ?></div>               </div>
           </article>
           
            <?php endwhile; else: ?>
           <div class="no-results">
              <p><strong>There has been an error.</strong></p>
             <p>We apologize for any inconvenience, please <a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>">return to the home page</a> or use the search form below.</p>
             <?php get_search_form(); ?> <!-- outputs the default Wordpress search form-->
            </div>
           <!--noResults-->
            <?php endif; ?>
           <?php wp_reset_query(); ?>
           
           <?php if ( ! dynamic_sidebar'Content' ) ) : ?>
                    <!-- Widgetized Header -->
                <?php endif ?>
                  
             </div>
        <!--#content-->
    </div>
    <div class="grid_4"><?php get_sidebar(); ?></div>
</div>
<?php get_footer(); ?>
Thanks in advance.

Last edited by snakeair; 05-07-2012 at 10:04 PM.
 
  #2 (permalink)  
Old 02-18-2012, 10:25 PM
HTMLBasicTutor's Avatar
Administrator
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 20,270
iTrader: 5 / 100%
I believe what you are wanting is called a Sticky Post.
__________________

HTML Basic Tutor - Learn how to code for better SEO
Basic Computer Information - Computer & internet basics for website owners

SEO troubleshooting and review services available. - Pm me.
 
  #3 (permalink)  
Old 02-18-2012, 10:41 PM
n_touch's Avatar
Contributing Member
 
Join Date: 09-27-10
Posts: 230
iTrader: 0 / 0%
Do you think that would be the best way to do it? Sorry, I am not that great with wp coding. Thanks
 
  #4 (permalink)  
Old 02-18-2012, 10:48 PM
HTMLBasicTutor's Avatar
Administrator
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 20,270
iTrader: 5 / 100%
Well I don't really like using plugins myself. Prefer to figure out how to do something w/o plugins.

If you search sticky post wordpress you could find some other ideas and some plugins.

You could also search for featured post wordpress.
__________________

HTML Basic Tutor - Learn how to code for better SEO
Basic Computer Information - Computer & internet basics for website owners

SEO troubleshooting and review services available. - Pm me.
 
  #5 (permalink)  
Old 02-20-2012, 08:38 PM
Contributing Member
Latest Blog:
None

 
Join Date: 06-14-10
Posts: 786
iTrader: 0 / 0%
Of course you can use the stickys or featured but there is also a plugin for top 5 which might work as well. You can edit it to make it the top 1 only.
__________________
My Site: MacLappy [link soon!]

Hosted by: Myhosting.com
 
  #6 (permalink)  
Old 04-11-2012, 06:42 AM
seosingapore's Avatar
Member
 
Join Date: 04-09-12
Location: Singapore
Posts: 31
iTrader: 0 / 0%
Another approach is to set a custom home page in WordPress. Go to Reading setting - select what you want to use for the front page and the post page. May or may not work depending on the theme you use.
 
  #7 (permalink)  
Old 05-07-2012, 09:26 AM
Contributing Member
Latest Blog:
None

 
Join Date: 05-07-12
Posts: 58
iTrader: 0 / 0%
Most themes will allow you to go to Settings - Reading to select "your latest posts" or "static page" for your front page. Selecting "static page" will enable you to customize it to the look and feel of a traditional website, as opposed to just a blogging site.
__________________
...just thinking about hiking Harney Peak and Clingmans Dome.
 
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wordpress templete question! ameerulislam Blogging Forum 20 02-23-2011 08:49 PM
Question about wordpress content Stevebeans Blogging Forum 1 12-06-2010 12:51 PM
Wordpress question theentry Blogging Forum 4 10-18-2010 05:26 AM
Wordpress Question Treybor Blogging Forum 10 01-25-2010 02:40 PM
Wordpress SEO question Gary-NFFC SEO Forum 4 04-15-2008 03:18 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 07:27 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.