Loop 1 user randomly

I found a realy great solition here. !! It is a function that kindof ‘adds’ ‘orderby’ => ‘rand’ as a parameter. What it does it that when someone uses that parameter, the function will query the database using regular MySQL, where random is always possible 🙂 The function: // put this in your functions.php add_filter(‘pre_user_query’, … Read more

Static home page ignored

I’m interpreting that the static page you intend to show is a static page for the home page of your site. If that’s the case, and the static page is truly static, I recommend saving the page as index.html and saving it (via ftp) right next to your WP index.php file in the root folder … Read more

Echo multiple tasks if a common function exists

As @Howdy_McGee mentioned in the comments, you can just wrapped the multiple commands you want to run within curly brackets like this: <?php if (function_exists (‘pluginName’)) { echo someName (7); echo someName (8); echo someName (9); } ?>

Ajax Load more CPT via shortcode

This will (*should) fix your first problem: function rmcc_post_listing_shortcode1( $atts ) { // No need for output buffering – AJAX handlers should ECHO their response // ob_start(); // .. // So long, farewell // $myvariable = ob_get_clean(); // return $myvariable; // Now terminate exit; } Your second problem is that you are not implementing any … Read more

Can’t get data from audio media

MP3 Playlists have a .m3u extension. I’m guessing that your Media Library is not registering the MP3s but the playlists instead, so they may physically be in that location, but not in the database. One work around if you know the names of the files could be to try using the PHP id3_get_tag() function. Read … Read more

Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge

So turns out that on Safari and Firefox, the page would refresh before the email got sent out. As a workaround I just created another button that the user has to click on before clicking on the actual button that updates their profile information. The click event handler on that first button is being used … Read more

Some links broken after updating WordPress version

Search the theme source-code for SITE_HOME_URL and try replacing it with WP_HOME or with the result of esc_url(home_url()). Locate THEME_PATH and replace it with the result of get_theme_root(). EDIT: In the case of expressduplication.co.uk/SITE_HOME_URLspecial-offers there is probably a wp_redirect() or wp_safe_redirect() that doesnt work because of the undefined constant SITE_HOME_URL.