D
D
Denis Vasiliev2016-02-21 13:35:04
PHP
Denis Vasiliev, 2016-02-21 13:35:04

How to change the output of the country selector?

Here is the code that displays a list and a button next to it! Is there a way to display links when you click on a cat. the language has already changed.

if ( $countries ) : ?>

  <form name="wcpbc-country-selector" method="post">
    <select name="wcpbc-manual-country">
      <?php foreach ($countries as $key => $value) : ?>
        <option value="<?php echo $key?>" <?php echo selected($key, $selected_country ); ?> ><?php echo $value; ?></option>
      <?php endforeach; ?>
    </select>
    <input type="submit" value="select" />		
  </form>	

<?php endif; ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2016-02-21
@good_job

<?php foreach ($countries as $key => $value) : ?>
<form method="post">
<input type="hidden" value="<?php echo $key?>" name="wcpbc-manual-country">
<input type="submit" value="<?php echo $value?>" />
</form>
<?php endforeach; ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question