Check radio get value to array

First, let’s put all the “payvalue” radio options into an array. This will allow us to then display them all using a foreach loop to reduce redundancy and the chance to make a mistake: $payValueOptions = [126500000, 252000000, 503000000]; Now, let’s render the fields in a foreach loop: $selectedPayValue = $_GET[‘price’]; foreach ($payValueOptions as $option): … Read more

Putting a URL, for a preview, in a side bar

Simply placing a url isn’t going to embed a webpage within a webpage. You could use an iframe. <iframe src=”http://yoururl”></iframe> To display the page content from that url. You could also capture the page via php and scrape it for the information you need but you would have to create a custom widget for this. … Read more

WooCommerce category display in custom page

You have to create a custom template for that. The template have to clone the content of taxonomy-product_cat.php, which thankfully is basically a single line. Your template will be something like this: <?php /** * Template Name: YOUR TEMPLATE NAME HERE */ // Set the parameters of your query $args = array( ‘post_type’ => ‘product’, … Read more

How to show value from ACF plugin field in e-mail?

It was the thing in the order of functions, and the check : if(is_user_logged_in()){ $current_user = wp_get_current_user(); } else { $user_id = get_post_field( ‘post_author’, $post_id ); $current_user = get_userdata($user_id); }

Cant enter admin page with SSL

Not sure what the exact problem here is but you could try adding the following line in wp-config.php file define(‘FORCE_SSL_ADMIN’, true); Let me know how this works out.

WP Archive & Category Pages not filtering

From the codex for get_posts() The category parameter needs to be the ID of the category, and not the category name. So you should either use category_name parameter with name or you could pass the ID to category. <?php $term_name = get_queried_object()->name; $args = array ( ‘category_name’ => $term_name, ‘posts_per_page’ => 5); $myposts = get_posts( … Read more

How to add input search field with roudned corners?

Your markup is technically correct with the exception of your first line of css. You need to remove the e before the .searchform declaration for it to accept those styles. The code below is working correctly (see demo here: https://codepen.io/raptorkraine/pen/eyJrJG) however if your input still doesn’t show rounded borders it might be that your styles … Read more

How to create a template for categories

So for this you’d want to use Category Templates in your theme file, which you can read about in the codex here: https://codex.wordpress.org/Category_Templates Basically, let’s say you have the category “Trending Articles”, with the category slug being trending. You would want to copy the category template from your current theme (category.php, or if that doesn’t … Read more