dcexc
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: limit published posts per user in taxonomy termThe thing is – Im using ACF frontend plugin to display the form, so i have it set so when the form is submitted, the post status is pending. Only admin can approve a post a published, however – i just cant control how often a user is going to try add a post, so its more of a management thing, that i cant even forget and approve a post if theres still another one published. Im not sure if that makes sense.
Thanks heaps for even replying – im also not a dev, i can just get myself out of trouble by editing snippets etc.
[redacted] i just need some sort of control over these posts
- This reply was modified 5 years, 1 month ago by bcworkz.
Hi matt – i had the same question, did you come to a conclusion?
apologies – my initial upload didnt render the snippet properly. hopefully this works. it shows the loops. i got it to work – by using this if statement – which essentially sort of followed on from what you were saying
function show_global_pics_in_personal_library(){?> <?php $variablename = get_field('dcfg_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br><br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php $variablename = get_field('dchdl_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php $variablename = get_field('dcstd_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php $variablename = get_field('dcthdl_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php $variablename = get_field('drcfg_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php $variablename = get_field('drchdl_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php $variablename = get_field('drcstd_global_item_select'); if ( !empty( $variablename ) ) {?> <?php foreach($variablename as $variablename2):?> <h6> <a href="<?php echo get_page_link($variablename2 ->ID);?>"> <center> <img src="<?php echo get_the_post_thumbnail_url($variablename2->ID, 'medium');?>"> <br> <?php echo $variablename2 ->post_title; ?> </center> </a> </h6> <?php $post = &get_post($variablename2->ID); $post_type = $post->post_type; $taxonomies = get_object_taxonomies($post_type);?> <?php foreach ($taxonomies as $taxonomy): $terms = get_the_terms( $variablename2->ID, $taxonomy ); foreach ( $terms as $term )?> <h6> <a href="<?php echo get_term_link($term->slug, $taxonomy);?>"> <center> <?php echo $term->name;?> </center> </a> </h6> <?php endforeach;?> <?php endforeach; }?> <?php }?> <?php add_shortcode('show_global_pics_in_personal', 'show_global_pics_in_personal_library');- This reply was modified 5 years, 1 month ago by bcworkz.
Forum: Plugins
In reply to: [Product Image Hover Effects WOOC - WPSHARE247] Covers WCFM Store BadgeForum: Plugins
In reply to: [Product Image Hover Effects WOOC - WPSHARE247] Covers WCFM Store BadgeWCFM – in your plugin description it says you are compatible with it