Post Tags and Categories for Pages
[resolved] Effecting my Events Calendar (3 posts)

  1. Fi Fi P
    Posted 2 years ago #

    Great plugin and all works smoothly for me except it is somehow changing the a tags on my Events Manager calendar. The code below is for a div on my homepage that shows some details for my 'Hire' page.
    If I change 'post_type'=>'page' to 'post_type'=>'post' then the calendar goes back to normal but my details from the Hire page don't show? Has anyone a solution for this?!

    <div id="block1"><div id="block1-title">HIRE US</div>
    $args = array('post_type'=>'page', 'tag_id'=>32, 'posts_per_page'=>1);
    $myposts = get_posts( $args );
    foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
    <div class="postpic"><?php echo get_the_post_thumbnail($page->ID, 'homepage-thumb'); ?></div>
    <div class="postname"><strong><a>"><?php the_title(); ?></a></strong></div>
    <div class="postexcerpt"><?php
      $excerpt = get_the_excerpt();
      echo string_limit_words($excerpt,15);
    <div class="more-linkhm"><a>"</a>More</div>
    <?php endforeach;

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum's parser.]


  2. Fi Fi P
    Posted 2 years ago #

    You can ignore the above problem, the issue was my permalink for the more tag:

    <div class="more-linkhm">"More</div>

    Do you know the permalink I need to make the word More a link to the featured post?

  3. curtismchale
    Plugin Author

    Posted 2 years ago #

    If you're using it inside a WP_Query loop then the_permalink would work fine. If you have access to the post_id then you'd use get_permalink( $post_id ) which calls the post permalink given the post_id.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Tags and Categories for Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.