donate goal not showing in list
-
Hello
i try to make a list of all donation forms with your tutorial.
1.)
but with this code it doesnt show the goal.. is this wrong ?<?php } //Output the goal $goal_option = get_post_meta( $id, '_give_goal_option', true ); if ( $goal_option == 'yes' ) { $shortcode = '[give_goal id="' . $id . '"]'; echo do_shortcode( $shortcode ); } ?>
Complete PHP:
<?php /** * Used to display an archive page of Give Donation forms. * * This file is designed for use with the "default" twenty sixteen theme, and distributed as a sample * Always test archive templates before using on production sites. * * For more info, visit https://givewp.com * * @link https://givewp.com/ * @author [email protected] */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main give-archive" role="main"> <?php if ( have_posts() ) : ?> <h1 class="my-give-archive-title">So k?nnen Sie uns unterstüzen</h1> <hr/> <?php do_action('my-give-before-archive-loop'); while ( have_posts() ) : the_post();?> <div class="my-give-archive-form"> <?php do_action('my-give-before-archive-form'); //Output the title ?> <br><br> <h2 class="my-give-archive-form-title give-form-title"> <a href="<?php echo get_the_permalink(); ?>"><?php echo get_the_title(); ?></a> </h2> <br> <?php $id = get_the_ID(); $placeholdit = give_get_placeholder_img_src(); //Output the featured image ?> <div class="image-wrap"> <?php if (has_post_thumbnail()) { give_get_template_part('single-give-form/featured-image'); } else { ?> <div class="images" style="background: url(<?php echo $placeholdit; ?>) no-repeat center;min-height: 236px; min-width: 378px; "> </div> <?php } //Output the goal $goal_option = get_post_meta( $id, '_give_goal_option', true ); if ( $goal_option == 'yes' ) { $shortcode = '[give_goal id="' . $id . '"]'; echo do_shortcode( $shortcode ); } ?> </div> <?php //Output the content $content_option = get_post_meta( $id, '_give_content_option', true); if ( $content_option != 'none' ) { $content = get_post_meta( $id, '_give_form_content', true ); echo '<div class="my-give-archive-content">' . $content . '</div>'; } //Output a link to take users to the form ?> <button class="btn success"><a style="text-decoration:none;" href="<?php echo get_the_permalink(); ?>"><font color="white">Jetzt spenden</font></a></button> </div> <?php do_action('my-give-after-archive-form'); endwhile; else : //If you don't have donation forms that fit this query ?> <h2>Sorry, keine Spenden Formulare gefunden.</h2> <?php endif; wp_reset_query(); do_action('my-give-after-archive-loop'); ?> </main> </div> <?php get_footer(); ?>
2.) how to change the placeholder picture?
3.) when i use the shortcode generator donation goal in wordpress site, it says “no form found”
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘donate goal not showing in list’ is closed to new replies.