Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Hey Guys,

    I am nearly finished with my blog but there are a few bits to tinker with.

    The problem I am asking for help on can be found here: http://collossalpixel.com/cp-blog/


    What I am trying to do:

    Have a static posts page, that will have the blog-banner image at the top (currently orange image but to be replaced later) and underneath have the rest of the page that automatically updates and shows the 10 (doesn't have to be 10) latest posts that have been made.

    I would like the whole post to show up, rather than just a link to the post, which can be seen under the 'blog' section on the home page.

    I am not sure whether this is possible?


    Problem so far:

    So far, I am able to get the image in the correct place, but the static page only has the title of the page and the date of the page, which I do not want to be there.

    You can select the other categories which display the posts how I am wanting.


    Possible solution?

    To create a category called 'name' and have all the latest posts show on that page. Then tell the static cp-blog page to copy the 'name' page, hence seemingly have the latest posts on this page.

    In my mind this sort of makes sense but it is hard to put into words.

    Anybody have any idea what I am trying to do?

    Many thanks if anybody is able to solve this riddle!


    Example:

    Here is an example of what I am trying to achieve. http://www.fullyillustrated.com/fi-blog/
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  2.  

  3. #2
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Greetings Hitch-CP,

    What you're wanting is a "custom page template" to solve your problems. Unfortunately this is not "easy" to do, but I can give you a quick crash-course.

    1. Download (or open) your wordpress theme directory (ie. /wp-content/themes/theme-name) and find the page.php file.
    2. Copy page.php to mycustom1.php (do not rename or replace!!!)
    3. Open the file with your favorite editor.
    4. At the top of the file, locate:
    Code:
    <?php
    /*
    something here
    */
    And replace with:
    Code:
    <?php
    /*
    Template Name: MyCustom1
    */
    5. Find in the template now where it says "Title" (usually wrapped in "h2" tags), date, etc, and customize it to what you want.
    6. Re-upload the file.
    7. Under "Pages" in your dashboard, find the page you're wanting to reflect these changes, to the right, you'll now see "Page Template", select "MyCustom1", and "Update" the page.

    Just go check the page, but all should now be in order to the way you want.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  4. #3
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Hey Danny,

    Thanks for posting this.

    The strange thing is I had already tried this and it hadn't worked. Nevertheless, I decided I would try again with your version and again it didn't work.

    This really baffled me because I know it should have worked. In the end I just decided 'screw this, I'll make another page', which I did and then went through the same method and low & behold it worked!

    Don't know why wordpress was being crazy - the old cp-blog page just did not want to do what it was told and decided to partially copy another template ... weird I know!

    Anywho, basically fixed now. A big thumps up for the effort.
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  5. #4
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Did you see to the right of the page area where it had the templates? It should look something like this:


    If so and it still isn't working, send me your template page your made, I'll see if I can find the problem for you.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  6. #5
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Yup had done everything you suggested before, it was just being really weird. May need your help a little later though for some other small tweeks if that is ok
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  7. #6
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Yep no problem, if you can post that template page you made, I'll see what I can do if you want the page title, post time, and all of that removed... When you create a custom template like that you can pretty much make that page stand-out entirely from the rest of the site. Some people even make mobile access pages with that method, so I'm not quite sure what would "over-ride" those settings unless you have a really old wordpress install or something lol.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  8. #7
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Oh I forgot he he... In that custom template, do this before you see the_content();
    Code:
    query_posts('cat=4'); // cat= your category ID !!!!
    You can see more references on how to use query_posts in the Wordpress Codex.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  9. #8
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Location
    London
    Posts
    120
    Member #
    19164
    Parse error: syntax error, unexpected ';' in /home/colloss1/public_html/wp-content/themes/cp-v2/mycustom1.php on line 20

    Code:
    <?php /* Template Name: MyCustom1 */ ?>
    
    <?php get_header(); ?>
    
    	<div id="blog-image">
        <img src="http://www.collossalpixel.com/wp-content/themes/cp-v2/images/blog-banner.jpg" border=0 width="935" height="325" alt="Collossal Pixel Blog Banner" />
        </div><!--end #blog-image-->
    
    	<div class="content">
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    			
    		<div class="post" id="post-<?php the_ID(); ?>">
    
    			<h2><?php the_title(); ?></h2>
    
    			<?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
    
    			<div class="entry">
    
    				<?php query_posts('cat=latest-news'; ?>
                    
    				<?php the_content(); ?>
    
    				<?php wp_link_pages(array('before' => 'Pages: ', 'next_or_number' => 'number')); ?>
    
    			</div>
    
    			<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    
    		</div>
    
    		<?php endwhile; endif; ?>
        </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    What have I done wrong there?
    Ali Hitch

    Portfolio & Tutorial Site
    www.alihitch.com

  10. #9
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Code:
    <?php query_posts('cat=latest-news'; ?>
    Should be:
    Code:
    <?php query_posts('cat=latest-news'); ?>
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer

  11. #10
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    But hang on there, the category: is not valid, it should be a number....

    Go to your categories, and "hover" over the edit link, you'll see cat=SOMENUMBER for the target, thats the category ID (without having to open your database management program).
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:53 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com