Events not showing in blog loop

Home Forums Calendar Products Events Calendar PRO Events not showing in blog loop

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1228063
    Jarle
    Participant

    Hi
    I have a theme build by a company which is no longer in business and am trying to figure out why Events are not showing up in Main Page blog loop. (I have ticked off the option in Events Calendar Settings and read forum discussion which lead me to think that the code made by my developers may be a cause.)

    I have not tried to de-activate plugins or reverted to a the TwentyForuteen theme as the site is live. However, my guess is that the code below is the cause, and that some techie-wizards in this forum would spot the problem at a glance :-). If not, I guess I have to de-activate and keep probing.

    I guess I found the loop (in page-5.php in the root of the theme folder) and would appreciate some help or pointers to a solution 🙂 Thanks!

    // The Loop
    if ( $the_query->have_posts() ) {
    $postnr = 0;
    while ( $the_query->have_posts() ) {
    $the_query->the_post();
    $postnr++;
    $frontpage_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘nyhet-forside’);
    if (!$frontpage_url[0]): $frontpage_url = wp_get_attachment_image_src( 5160, ‘nyhet-forside’); endif; ?>
    <div class=”infoboks nyhet”>
    “>
    ” width=”<?php echo $frontpage_url[1]; ?>” height=”<?php echo $frontpage_url[2]; ?>” />

    “>

    <?php the_title(); ?>

    <?php echo wp_trim_excerpt(); ?>

    ” class=”button”>Les mer
    <?php if ( $postnr == 6 ) { ?>
    <br />” class=”button more-posts”>Se flere saker
    <?php } ?>
    </div>
    <?php }
    } else {
    // no posts found

    #1229037
    Andras
    Keymaster

    Hello Jarle,

    Thanks for reaching out to us with your question.

    Although we are limited in supporting customizations, I can try to give you some pointers.

    The code you pasted does seem like a loop, but I’m not quite sure why it wouldn’t show the events if you have the setting under Events > Settings > General tab > Include events in main blog loop switched on.

    In case you don’t want to disturb your live site, then the best would be creating a copy of it to have a development site where you can run some tests. Do you think you would be able to do that?

    Cheers,
    Andras

    #1245826
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Events not showing in blog loop’ is closed to new replies.