Support » Plugin: Post Tags and Categories for Pages » Effecting my Events Calendar

  • Resolved Fi Fi P


    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.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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?

    Plugin Author curtismchale


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Effecting my Events Calendar’ is closed to new replies.