Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1078504
    mallorcanetworks
    Participant

    Hi!

    I want to list the tittles of posts of certains categories (Almost like the latest posts shortcode, but just tittles of a categorie,
    It is posible?

    Thanks!

    #1078888
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    Thanks.

    #1080081
    mallorcanetworks
    Participant

    hi!

    Yes i try to explain it better (pardon for my bad english)

    I´m making a web for a wine shop, and we are adding wine info in posts (see http://www.islacatavinos.com/armas-de-guerra-blanco/)
    Every wine has a category based on the brand of the wine,
    What i want to do is add a shortcode (or similar) that shows all the post tittles of the selected category.

    I found this code, but is php, and when i add it to where i want to display this post tittles doesnt work

    I hope i made it a bit clear!
    Thnankkks!

    #1080082
    mallorcanetworks
    Participant

    upps the code is this one

    
    <ul><li><h2>Photography</h2>
    <ul>
    <?php 
    query_posts('category_name=Photography&showposts=-1'); while(have_posts()) : the_post(); 
    ?>
    <li><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink to <?php the_title(); ?>"><?php the_title(); ?></a></li>
    <?php endwhile; ?>
    </ul>
    </li></ul>
    
    #1080298
    Rupok
    Member

    Hi there,

    You can try this :

    <h2>Photography</h2>
    
    <ul>
    <?php query_posts('cat=1&showposts=5'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <li>
          <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
      </li>
    <?php endwhile; endif; ?>
    </ul>

    Let’s change cat=1 with proper category ID.

    Cheers!

    #1080383
    mallorcanetworks
    Participant

    hi!

    The idea was to add this in to a accordion, and when i add it makes a bug and the acordion doesnt work, and doest show the posts, Do you know why?

    The acordions are in here,
    http://www.islacatavinos.com/vinos/

    I will be easy to create a shortcode for that action?

    Thnaks!

    #1080688
    Rue Nel
    Moderator

    Hello There,

    This will not work because the code is in PHP. You must create your own shortcode out of that PHP code so that you can use it inside the accordion or any element. As this is all custom development, regretfully we won’t be able to assist further. Custom development is outside the scope of our support. We’re happy to provide advice and get you started in the right direction, but you would still be responsible for the implementation.

    For the meantime, please check out other 3rd party plugins that may have this feature. Perhaps this one will help:

    List categories

    Thank you for your understanding.

    #1081215
    mallorcanetworks
    Participant

    hi!
    I understand it, thanks!

    #1081262
    Lely
    Moderator

    You’re welcome!

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1078504 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>