• Resolved zup44

    (@zup44)


    hello,

    I’m a french user Arconix.
    I am trying to display the last article in a Arconix category.
    How to do? I am a beginner.

    I know to display the last item of a class in wordpress is made:

    <?php query_posts('cat=88&showposts=1'); while (have_posts()) : the_post(); ?>
    
    <?php if(has_post_thumbnail())
    echo get_the_post_thumbnail( get_the_ID(), array(295,120) );
     else {
    $imgthumb = catch_that_image();
    echo "<img src='".$imgthumb."' alt='".get_the_title()."'>";
     }?>
    
    <?php
    foreach((get_the_category()) as $cat) {
    echo $cat->cat_name . ' ';
    } ?> 
    
    <?php the_title(); ?>
    
    <?php the_excerpt(); ?>
    
    <?php endwhile; ?>

    How is it to display the last article category Arconix as homepage ???
    Thank you in advance for your help !!

    https://wordpress.org/plugins/arconix-portfolio/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Gardner

    (@jgardner03)

    Hi zup44,

    Thanks for using my plugin. Are you trying to display the most recent portfolio item on your home page?

    if so, the following will work:

    [portfolio posts_per_page=1]

    If it’s in a page template, the following will work:

    echo do_shortcode( '[portfolio posts_per_page=1]' );

    Thread Starter zup44

    (@zup44)

    Thank you for your reply, but there is a problem because I want to view the last article in a category.

    thank you

    Plugin Author John Gardner

    (@jgardner03)

    Are you trying to grab posts or portfolio items?

    Thread Starter zup44

    (@zup44)

    I do not understand ??

    Thread Starter zup44

    (@zup44)

    I use to display arconix portefolio article is in category.
    I just want to see the last post of portefolio arconix category on the home page !!!

    Thank you

    Plugin Author John Gardner

    (@jgardner03)

    Neither do I right now. You posted this question in my portfolio plugin forum, yet you’re looking to pull articles and categories. My portfolio plugin does not have articles (those typically refer to WordPress posts) or categories.

    edit:

    [portfolio posts_per_page=1 terms="Category Title"]

    Replace “category title” with whatever feature you’d like to display.

    Thread Starter zup44

    (@zup44)

    Thank you for your reply, I have delayed in responding.
    When you say:
    Replace “category title” with whatever feature you’d like to display.
    What are the possible feature ??

    Thank you

    Plugin Author John Gardner

    (@jgardner03)

    Like categories or tags for posts, portfolio features are defined by the users, so I couldn’t possibly know the answer to that question.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘view the articles on the homepage’ is closed to new replies.