(Apologies for anything amateur I’m about to ask)
I am using WP for a very small project, and am very new to it. In the website I have maybe 10 pages. From the homepage I have set up I want to display hyperlinks to each of the 10 pages somewhere in the body of the page… but at the moment I can only do so by creating a written list of them (am only using ‘edit page’):
<strong>List of links:</strong>
<ul>
<li><a href="www.1.com">1</a></li>
<li><a href="www.2.com">2</a></li>
<li><a href="www.3.com">3</a></li>
</ul>
What I hope to achieve is the above but displaying as a dropdown menu (like a simple form menu that I see online everyday would be great) to make it more compact and user friendly. All the links folded into one line, with the user then just able to click and select the hyperlink they need, which they then get taken to. I can’t for the life of me google this! I came across wp_dropdown_pages() but am not sure how to use it and none of the examples work when I copy-paste into my ‘edit page’ text editor… 🙁
(also I don’t think I want it as a widget, or generally as the dropdown menu at the top of the website/theme… I just want it somewhere on my page and to be able to customise which links are in the dropdown list as I would my above list… just more compact. I’d be happy for other suggestions too)
Something like this, but only the actual dropdown menu:
<div class="sf_field sf_field_00NA0000008rkLE sf_type_select">
<label class="w2llabel required select" for="sf_00NA0000008rkLE"> (without this label though) <sup><span class="required">*</span></sup></label>
<select id="sf_00NA0000008rkLE" class="w2linput select" name="00NA0000008rkLE">
<option value="default">Select one...</option>
<option value="---">------------------</option>
<option value="car">Car</option>
<option value="bike">Bike</option>
<option value="lorry">Lorry</option>
</select>
</div>
Would be very grateful for any help!!