• Help me find a plugin that can basically Feature posts on my static homepage. I have a bunch of articles on a certain category in wordpress, and basically just want this plugin to show the titles of the latest articles [from the specific category] on the homepage. I searched WordPress for an hour and a half with no luck as I don’t know what to search for exactly, But I know something like this should exist.

Viewing 14 replies - 1 through 14 (of 14 total)
  • No plugin necessary. Just this bit of coding:

    Substitute the ***** with the category name you want to use (don’t capitalize) and the XXXX with the number of posts you wnat viewable.
    This code will show the whole post.

    <?php $the_query = new WP_Query('category_name=*****&showposts=XXXX&orderby=post_date&order=desc');
    
    						while ($the_query->have_posts()) : $the_query->the_post();
    
    						$do_not_duplicate = $post->ID; ?>
    
    						<li><?php echo strip_tags(get_the_content(), '<a>'); ?></li>
    
    						<?php endwhile; ?>

    To show only the excerpt use this code:

    <?php $the_query = new WP_Query('category_name=*****&showposts=XXXX&orderby=post_date&order=desc');
    
    						while ($the_query->have_posts()) : $the_query->the_post();
    
    						$do_not_duplicate = $post->ID; ?>
    
    						<li><?php echo strip_tags(get_the_excerpt(), '<a>'); ?></li>
    
    						<?php endwhile; ?>

    Thread Starter remotay

    (@remotay)

    Well, don’t want to show the entire post, Just the Titles of each post like a list. Please provide the code for that. and Can I put the code in the Post or do I need to go to template? I have Phpexec installed.

    Isn’t it better to be a bit more polite? ?? Although it’s not quite what you’ve queried, jaclynmarie1 has certainly offered a lot more help than most others would be prepared to post.

    You could probably replace the <li></li> part with:
    <li><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></li>

    However, I do wonder if your original question ‘static’ homepage means a webpage outside of the usual WordPress?

    Thread Starter remotay

    (@remotay)

    My title does say please. Thank you for the Information :D. I’ll test the code in a bit.

    Thanks to jaclynmarie1 really ?? The code I’ve posted is straight from one of the documentation pages so most of the work is still by her.

    p/s: And this should go into a template.

    Oh! I’m sorry I didn’t read where it said you just wanted the title. ?? Either way, hope I helped. And you’re very welcome. (Thanks to you as well mosey, you’re very polite!)

    Thread Starter remotay

    (@remotay)

    Thank you Jaclynmarie1 ?? You rock! We need more awesome people like you two on the wordpress forums. I love wordpress so much. I use it on all my websites, and Its absolutely wonderful :D. Does wordpress have a donate page?

    Thread Starter remotay

    (@remotay)

    One problem.. I’d love for some assistance.

    Heres the code I’m using. It does the job, but has some unusual side-effects.

    <h2><a href="https://mmohub.org/mmorpg/ummo">MMO / MMORPG Thoughts</a></h2>
    
    <?php $the_query = new WP_Query('category_name=ummo&showposts=5&orderby=post_date&order=desc');
    
    						while ($the_query->have_posts()) : $the_query->the_post();
    
    						$do_not_duplicate = $post->ID; ?>
    
    <li><a>"><?php the_title(); ?></a></li>
    <?php endwhile; ?>

    My homepage, https://mmohub.org
    Put your cursor over my adsense ads on the sidebar. It highlites something on the bottom, and if you click the bottom portion, it’ll link to one of the random articles. It does the same thing if you click on the Magnifying glass on the search icon [top right]. It also links to the random article on the title of the “Other pages”. What am I doing wrong? How can I fix this?

    <li><a>"><?php the_title(); ?></a></li>

    Shouldn’t this bit be:

    <li><a><?php the_title(); ?></a></li>

    Thread Starter remotay

    (@remotay)

    <?php $the_query = new WP_Query(‘category_name=UMmo&showposts=5&orderby=post_date&order=desc’);

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <?php endwhile; ?>

    There is no mistake like that. The part I qutoed before is borked. This is the code i’m using…

    Thread Starter remotay

    (@remotay)

    Wow, The code is messing up here…

    <?php $the_query = new WP_Query(‘category_name=UMmo&showposts=5&orderby=post_date&order=desc’);

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <?php endwhile; ?>

    I’m now confused as to which code you’re actually using? ??

    Thread Starter remotay

    (@remotay)

    If I put the code here, www.remarpro.com messes the code up.
    &lt;h2>MMO / MMORPG Thoughts</h2>

    <?php $the_query = new WP_Query('category_name=UMmo&showposts=5&orderby=post_date&order=desc');
    
    						while ($the_query->have_posts()) : $the_query->the_post();
    
    						$do_not_duplicate = $post->ID; ?>
    
    <ul>
    <li><a>"><?php the_title(); ?></a></li>
    </ul>
    						<?php endwhile; ?>

    Even if you use the back-ticks to include the code?

    like this

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Need some quick help finding a Plugin Please.’ is closed to new replies.