How to display a value from a radio button in the options menu in wordpress

Your form is sending data using POST method, so you should receive selected value of radio button in $_POST[‘colorSelect’]. To simply display it you can use: if(isset($_POST[‘colorSelect’])) echo $_POST[‘colorSelect’]; else echo “Nothing selected”; To save it to options table use following code at the start of your function colorSelector(): if(isset($_POST[‘colorSelect’])) update_option(‘colorSelect’, $_POST[‘colorSelect’]); So you can … Read more

Can I change a variable in a content part while calling it?

Currently, you have your variable defined below the include which would be too late. If you defined the variable above the include it should be accessible by whatever file is included. $hssHeading = “A new different Title”; include( locate_template( ‘cp/heroSectionSmall.php’, false, false ) ); <!– heroSectionSmall.php –> echo $hssHeading; Maybe a better solution though is … Read more

Using Font Awesome as post thumbnail

Load the FontAwesome library properly in your theme via wp_enqueue_scripts hook, then instead of using: <img src=”https://wordpress.stackexchange.com/questions/353224/XY” class=”card-img-top” alt=”…”> use the icons fa fa-whatever in your theme. Sure, you have to do some checks based on category etc. I’d try something like this: <?php // functions.php function wpse_script_loading(){ // This can be local or via … Read more