Giving each loop post unique numbers so that WordPress would treat separately

Change your <video> id to be a class, so that there can be multiple of them on a page. Use .querySelectorAll(‘video.local-video’) to get all video elements with the class name of .local-video. Loop through all of those elements, and play them accordingly. Code: <!– Autoplay, on view video START–> <script> const localVideos = document.querySelectorAll(‘video.local-video’); // … Read more

WordPress behind HAproxy

I found your post by looking for a fix similar, I have haproxy set up and I’m trying to install wordpress on a backend server as well. I found this page: https://www.wpbeginner.com/plugins/how-to-fix-the-mixed-content-error-in-wordpress-step-by-step/ that details some HTTPS settings you can change in the wordpress settings that should fix it. For haproxy looking at your config you … Read more

Custom fields disappearing when a custom post type is assigned

I ended up solving this on my own and thought I would come back to show my solution. On my taxonomy page I needed to get the current taxonomy term like so: <?php $term = get_queried_object(); if (get_field(‘subtitle’, $term)) { ?> <p><?php the_field( ‘subtitle’, $term )?></p> <?php } ?> Here is the documentation page: https://www.advancedcustomfields.com/resources/adding-fields-taxonomy-term/

How to send HTTP_POST and receive results

https://www.modelaircraft.org/membership/verify is an HTML form, but it makes a AJAX request to https://www.modelaircraft.org/membership/verify?ajax_form=1&_wrapper_format=drupal_ajax to actually get the data. So, it’d be ideal to make a request directly there instead. I don’t think there’s a practical (and possibly TOS-compliant) way to do that, though, because their form generates a form_build_id NONCE, and the handler validates it. … Read more

Duplicate Content Issue with WordPress Permalink Structure and Primary Categories

function get_current_post_ID() { $postid = get_queried_object_id(); $post_url = get_permalink( $postid ); //wp_redirect( $post_url ); if( has_category(”, $postid) && urldecode(‘https://’.$_SERVER [‘HTTP_HOST’].$_SERVER [‘REQUEST_URI’]) != $post_url ) : wp_redirect( $post_url, 308 ); exit(); endif; } add_action( ‘template_redirect’, ‘get_current_post_ID’ );

Add custom css to specific user

In the code that you proposes the selector only works if previously added the attributes in the HTML. It is easier if you load a specific stylesheet just for certain users: Create a new CSS file with the specific styles, something like specific.css .just-for-user-b { color: #ffffff; } Add this code to your functions.php <?php … Read more