Woocommerce Booking – Display selected block amount or duration

I am using Woocommerce Booking plugin and I would like to display the number of blocks a user is about to book.


  • Create bookable product with 30 minute blocks, min:1, max;4
  • User selects start:9:00, end:10:30
  • Front end displays calculated price and “3 Blocks”

Is this possible? and how would I go about doing this? Is there a hook or is it a template change?

Display all videos on separate page from certain ACF field

I am using Elementor and ACF. Using ACF I created oEmbed field for adding videos for each post. Idea is to show all uploaded videos on separate page.

So on separate video page I want to display all videos related to this ACF oEmbed field from all posts.

I’ve tried with Elementor Custom Skin plugin, but two problems. Video UI is not like on Vimeo and another problem is display empty fields, so I have empty div elements, but I’ve add conditionals logic and still problem.

Floating point binary number to a 7 segment decimal display

I have covered floating point (32 bit) conversion from float to decimal and decimal to float. I am happy with the theory and I have created a conversion tool in Excel VBA which works just fine following the IEEE754 , so I am happy with theory. Also happy with add, sub , mult , div of 32 bit floating point binary numbers. What I cannot understand or find anywhere online is the answer to this simple question. How do computers / calculators do the final conversion from the floating point binary number onto a display. For eaxmple , I have built a BCD to decimal converter using Logisim (combinational logic gates) and I have built a Binary to Decimal converter in Logisim using the Double Dabble algorithm si I can see how these can display on a set of 7 segment displays but how does the number (0 10000001 01 00 11 00 11 00 11 00 11 00 11 0) which is the floating point binary for decimal number 5.2 actually get converted using logic circuits.

WordPress Plugin to display a list of input fields which are visible to everyone?

I am looking for a plugin/workaround recommendations. I am sorry if the title was not descriptive enough, this is the best I could think of. Any edit suggestion is welcome.

I want to display a list of editable text fields, which are updated by any visitor, and all updates are live and public to everyone else. The submitted fields may or may not be editable anymore.

So, once a visitor visits the page, there will be a list of empty blanks/fields, short text fields for instance. They will fill in their name and their details, then submit. All other visitors will see that this field is taken/filled.

The reason is that there will be a list of offerings, and the link will be distributed among participants only, each participant can fill a “slot” with their details after seeing which slots are available.

I don’t need any extra validation or complexity. Logging in is not required.

  • Preferably free, reasonably paid solutions are accepted, too.

Display list of posts from taxonomy term, but display the latest post featured image

I’m trying to do a page where all posts from a custom post type list, divided by their taxonomy terms and having a big photo on top of the list (latest featured image from said term). Right now I have the following code, but it displays the wrong images (each term should show latest post’s featured image, and I’m not even sure why the images are just random, even in the wrong term):

<section id="" class="">  <?php      }     wp_reset_query();   $  tax = 'technology-category';      $  terms = get_terms( $  tax ,array(          'orderby'    => 'ID',         'order'      => 'ASC',         'hide_empty' => 0,     ));      //Loop throug each taxonomy terms,      foreach ( $  terms as $  term ) {          //Query argument for post     $  args = array(              'post_type' => 'technology', // Or Custom Post Type,              'order' => 'DESC',              'orderby' => 'date',             'taxonomy' => $  tax,             'term' => $  term->slug, // Query posts for each term based on term slug         );         $  query = new WP_Query( $  args );          $  posts = $  query->get_posts();          ?>  <div class="container-fluid tech-cat-item py-5">     <div class="container">     <div class="row align-items-center pb-3">     <div class="col-1">     <img class="img-fluid" src="<?php echo z_taxonomy_image_url($  term->term_id); ?>"> </div> <div class="col-11">     <h3><?php echo $  term->name;?></h3> </div> </div> <?php //Do query to get image?        $  ga_item = array(             'post_type' => 'technology',               'order' => 'DESC',              'orderby' => 'date',             'taxonomy' => $  tax,             'term' => $  term->slug,              'posts_per_page' => '1', //just one because only need the latest post's featured image );        $  ga_query = new WP_Query( $  ga_item );         $  ga_posts = $  query->get_posts();     if ( $  ga_query->have_posts() ) {     while ( $  ga_query->have_posts() ) { $  ga_query->the_post(); ?>     <div class="row ga-panel py-5">     <div class="col-12">         <?php          $  ga_url = get_the_post_thumbnail_url($  post->ID,'full'); ?>         <img class="img-fluid ga-img" src="<?php echo esc_url($  ga_url);?>">     </div>     </div> <?php } } wp_reset_query(); ?>     <div class="row">         <?php          if ( $  posts ) {          foreach ( $  posts as $  post ) { ?>              <div class="col-4 ga-links">                 <a href="<?php the_permalink( $  post->ID ); ?>" data-swap="<?php echo esc_url($  ga_url);?>" > <?php echo $  post->post_title; ?></a>             </div>          <?php                     }         }        ?> </div> </div> </div>   <?php  }  wp_reset_query(); ?>                      </section> 

Display custom field under image in TinyMCE editor

I have a custom media field called “Source” with the key media_author. I would like to display it under the image in the TinyMCE editor, like the caption field is:

The caption under the inserted image.

The caption field is editable, but that’s not necessary for what I want to add. I found this code in /wp-includes/js/tinymce/plugins/wpeditimage/plugin.js. It looks like it’s part of how the caption is displayed.

return '<div class="mceTemp"><dl id="' + id + '" class="wp-caption ' + align + classes + '" style="width: ' + width + 'px">' +        '<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ caption +'</dd></dl></div>'; 

How can I display the most like posts from ultimate member?

With Ultimate Member Social Activity plugin the users are able to write posts and like each-others posts. I would like to display the most liked posts on a different page. How could I do that?

I was thinking on shortcodes but there are none for this purpose or write some code but i have no idea how to start it :/ I have seen a plugin with this functionality is possible to copy that peace of code and replace the hook from UM like counter? (If its make no sense i am sorry)

Thank You!

WordPress Astra archive page: chronological numbering w/ reverse-chronological display ordering?

On WordPress using the Astra theme I have archive pages containing titles and excerpts from 10 blog entries each, and when a new blog entry is written its title and excerpt go to the front. So the front archive page always has titles and excerpts from the 10 most recent blog entries, and the archive pages are arranged in reverse chronological order. This is pretty standard.

The problem is that the archive pages are not only ARRANGED in reverse chronological order: they are also NUMBERED in the same order. Thus the front page is labelled page 1, and the 10 entries posted BEFORE its 10 entries are on page 2. Correspondingly, “next page” refers to the next higher number. So for example the “next page” after page 7 contains excerpts from the 10 articles posted BEFORE the articles that are excerpted on that page.

I need the numbering to be the other way round.

For example if there are 117 entries than I want the page referring to the most recent entries (the 108th to the 117th) to be called page 12, and the previous page to that one (referring to the 98 the to 107th) to be called page 11.

This isn’t such a peculiar thing to do. It’s how issues of periodicals are numbered, for example.

How can I achieve this, whether by amending functions.php in the child theme (preferably), by writing a “Snippet” (next most preferred), or by amending archive.php in the Astra parent theme directly (least preferred, because of possible update problems)?

I know how to renumber the posts into direct chronological order, namely using the following PHP code. But unfortunately this DISPLAYS them in numerical order, which has now been reversed. So it causes the earliest posts to be excerpted on the front archive page rather than the latest ones!

<?php  add_filter(‘pre_get_posts’, ‘posts_by_forward_date’);  function posts_by_forward_date($  query) { if(is_archive() || is_home()) { $  query->set(‘order’, ‘ASC’); } } ?> 

Any help will be much appreciated!