• Resolved mhuynh55

    (@mhuynh55)


    I’m trying to work out something which I am unsure about. My main navigation menu are Pages (Home, Articles, Interviews). However, when I click for example, the Articles page, I want somehow for posts I’ve saved to populate and appear within that Articles page. So when I make a post and save it, on that page however, I just want it to have an excerpt and an image thumbnail with a link to the whole post. Is this possible?

Viewing 10 replies - 1 through 10 (of 10 total)
  • I posted a pretty good explanantion of how to fix you navigation here.

    As for the images, please see this thread.

    Thread Starter mhuynh55

    (@mhuynh55)

    Mfields, thanks so much. Well the page I got going is good and I have set it to my Articles page. However, I am unsure what to put in the custom template php file. What I want to appear on the Articles page is basically all the posts I have posted in WordPress to appear under each other like a normal blog. How do I go about doing this? Do I need to also incorporate the existing div classes of my theme?

    Actually, you do not need a custom template for step one. That would be optional. If you already have a homepage that looks how you like… Just skip step one. You can skip step 3 also – use your Articles page instead.

    For step 6: Select “Home” for “Front page” and “Articles” for “Posts Page”.

    Thread Starter mhuynh55

    (@mhuynh55)

    One thing however, my website I am working on: https://www.culturesinbetween.net/NEWWEBSITE/ is a custom theme. The front page is the way I like it. Like I previously mentioned, I would like the Articles page (at top) when clicked, will show and populate all the posts I have published like a normal blog where its in reverse chronological order. However, I don’t know if the theme can adjust what you have told me.

    It’s also why I asked you about the image thumbnails. Because I also thought what I could do for the Articles page is be able to have short snippets of each post. So an image thumbnail preview next to an excerpt of the whole post only. Then there is a link so that a person can read the whole post.

    You don’t need to change the theme at all to fix the articles link.

    1. Navigate to Settings -> Reading in your WordPress admin. The first set of options are “Front page displays”.

    2. You want to select “A static page (select below)” for the radio button input.

    3. Select “Home” for “Front page” and “Articles” for “Posts Page”.

    4. Scroll down to the bottom and press “Save Changes”.

    Thread Starter mhuynh55

    (@mhuynh55)

    If I did that, the Articles pages won’t display all my recent posts. It displays a duplicate of my front home page. This is because I am using the custom theme I am using. I want it to show my posts one by one under each other which is what it isn’t doing.

    For the images, use the following code in the loop of your index.php file. It’s basically the same code found here with a bit of extras:

    <?php
    	$images = get_children(
    	array(
    		'post_parent' => $post->ID,
    		'post_status' => 'inherit',
    		'post_type' => 'attachment',
    		'post_mime_type' => 'image',
    		'order' => 'ASC',
    		'orderby' => 'menu_order'
    		)
    	);
    
    	if ( $images ) {
    	$count = 1;
    	foreach ( $images as $id => $image ) {
    		if( $count === 1 ) {
    			$img = wp_get_attachment_thumb_url( $image->ID );
    			$link = get_permalink( $post->ID );
    			print "\n\n" . '<div class="alignleft"><a href="' . $link . '"><img src="' . $img . '" alt="" /></a></div>';
    		}
    		$count++;
    	}
    	}
    
    	print get_the_excerpt() . '<br /><a href="';
    	the_permalink();
    	print '">More</a><br class="clear" />' ?>

    If I did that, the Articles pages won’t display all my recent posts. It displays a duplicate of my front home page. This is because I am using the custom theme I am using. I want it to show my posts one by one under each other which is what it isn’t doing.

    Did you try it? I have done this on many blogs and it works like a charm. give it a try before you shoot it down.

    Thread Starter mhuynh55

    (@mhuynh55)

    Oh no, I’m not dismissing it mfields, really appreciating your help right now but I seem to be stuck because it’s not working properly. And I have tried it what you have told me.

    What I have done now is deleted the categories as my menu. I’ve instead just used a normal a href link as ‘home’ that links my main front page. But for some reason, it thinks my recent posts is my front page. My front page however uses special categories as modules.

    Please see my website: https://www.culturesinbetween.net/NEWWEBSITE/
    And this is how what I want to appear in the Articles page: https://www.culturesinbetween.net (do you see the right hand-side of the page?)

    I just sent you an email to the address listed here: https://www.culturesinbetween.net/contact

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘To create a page with a list of posts in it’ is closed to new replies.