On my website Here on my sidebar I have pages named 1-14. What I would like to know is how to remove the names of those pages showing up in the sidebar.
Thanks.
Since you're choosing to hide more pages than you're showing, in this case you may want to just pick what pages to show, and hide the rest. Head to the Layout section in Customize Design, and find this code:
{% for page in pages.all %}
<li class="title">
<a href="{{ page.url }}" class="{% if page.full_url contains page.url %}current{% endif %}">
{{ page.name }}
</a>
</li>
{% endfor %}
Then add an if
statement to only show a page like so:
{% for page in pages.all %}
{% if page.name == 'Entry' %}
<li class="title">
<a href="{{ page.url }}" class="{% if page.full_url contains page.url %}current{% endif %}">
{{ page.name }}
</a>
</li>
{% endif %}
{% endfor %}
If you want to show more than just the Entry page, you can add more to the if
statement:
{% if page.name == 'Entry' or page.name == 'Another page' %}
Another option is modifying the for
loop to only show the first page that's listed in Customize Design > Pages:
{% for page in pages.all limit: 1 %}