WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type for Smart Archives Reloaded plugin (10 posts)

  1. originalconcept
    Member
    Posted 3 years ago #

    Hi, I use the plugin Event Clendar Pro and I would like to display in the Smart Archives Reloaded plugin page the list of events created with the event calendar plugin.

    Event calendar pro uses custom post type, my quetion is how to edit Smart Archives Reloaded so it schows the evento from the aclendar plugin.

    thanks

  2. scribu
    Member
    Posted 3 years ago #

    You can pass the post type like this:

    <?php smart_archives('', array('post_type' => 'your_post_type')); ?>

    See http://scribu.net/wordpress/smart-archives-reloaded/sar-2-0.html

  3. originalconcept
    Member
    Posted 3 years ago #

    Sweet SCRIBU, it works, thanks a lot.

    One matter more, please if you can help me.

    Here the issue:
    http://tinyurl.com/27gdcn4

    How do i show current month (november) instead december.

  4. originalconcept
    Member
    Posted 3 years ago #

    Your plugin will show me always the last post published, I want it begins with the current month.

    thanks!!!

  5. originalconcept
    Member
    Posted 3 years ago #

    The last touch:

    Where should I modify to show the current month, and not the month of the furute post.

    http://tinyurl.com/27gdcn4

    thanks

  6. sylwiaofwarsaw
    Member
    Posted 3 years ago #

    I'd like to include post type posts too. Which file should I edit to add that line?

  7. scribu
    Member
    Posted 3 years ago #

    You can do it like this:

    <?php smart_archives('', array(
      'post_type' => array( 'post', 'your_post_type' )
    )); ?>
  8. jhodara
    Member
    Posted 3 years ago #

    Hi Scribu,
    thanks for your help. Though I got the function to filter only the months when the custom post type has entries, It still links to the general archives template, not my custom archives template.
    heres my code,

    <?php smart_archives('generator=SAR_Custom_Generator','post_type=nira_blog'); ?>

    would you know why?
    thanks

  9. ooomes
    Member
    Posted 2 years ago #

    Hi jhodara,

    am looking for the same answer...

    Scribu, it will be great if you could put some light on this.

    Thanks!

  10. precisiondesign
    Member
    Posted 2 years ago #

    I would love a solution to the custom post type issue, as well. Or at least have it unlink the month archives until there's a solution.

    I'd imagine this functionality would require the 'has_archive' property set to true when defining the custom post type, correct?

Topic Closed

This topic has been closed to new replies.

About this Topic