Update causes Meta tags to disappear
-
Hi,
I updated to Meta Box 4.8.0 this morning and it caused all my custom field data to disappear from the site. I’ve had to revert to the previous version which works, as I use the custom fields to create “Buy” buttons for books.
Please find the code below that I use. It suggests in the update notes that the old syntax will still work, and the syntax on the documentation page is exactly the same. Please let me know if I’ve done anything wrong? Note that the line of code to go in the functions file is in there, and I copied it fresh from the documents page. I’m also aware that sorting by custom field isn’t going to work like that, I’m still working on a fix for that, if anyone knows anything, I’d love to hear it.
<?php $args = array('category_name' => '1618centuries', 'tag_slug__and' => array('1618century'), 'orderby' => 'book_code', 'order' => 'ASC', 'posts_per_page'=> -1); $postslist = get_posts($args); foreach ($postslist as $post) : setup_postdata($post); ?> <div class="book-row clearfix "> <div class="book-thumbnail"> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail( $size, $attr ); ?></a> </div> <p class="code"><?php echo rwmb_meta( 'book_code' ); ?></p> <p class="code"><em><strong><?php echo rwmb_meta( 'mycpt' ); ?></strong></em></p> <a href="<?php the_permalink() ?>"><h4><?php the_title(); ?></h4></a> <p class="author"><?php echo rwmb_meta( 'book_author' ); ?></p> <p class="price">£<?php echo rwmb_meta( 'book_price' ); ?></p> <form action="form-action" method="POST"> <input type="HIDDEN" name="userid" value="9629947"> <input type="HIDDEN" name="product" value="<?php echo rwmb_meta( 'book_code' ); ?> <?php the_title();?>"> <input type="HIDDEN" name="price" value="<?php echo rwmb_meta( 'book_price' ); ?>"> <input type="HIDDEN" name="qty" value="1"> <input type="HIDDEN" name="return" value="clientwebsite"> <input type="HIDDEN" name="units" value="1"> <input class="cta" type="SUBMIT" value="Buy Now" name="SUBMIT"> </form> </div> <?php endforeach; ?>
I’m not sure if I need to say anything else, it should be enough to work on, but let me know if I need to say anything else.
- The topic ‘Update causes Meta tags to disappear’ is closed to new replies.