• Resolved kerer

    (@kerer)


    Hello,

    I have used the pages widget on my WordPress site however it does not show any specific styling for when a user is on the current page listed on the pages widget.

    For example, if I have pages 1, 2, 3 and the user is on the page entitled “1”, I would like the “1” to be bolded in the pages widget.

    How do I do this? I realize I will have to edit a .css document – where would it be located and what .css do I need to edit/add in order to achieve this?

    Thank you kindly for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The pages widget calls wp_list_pages()

    Under “Markup and styling of page items” it says that the current page has a class of “current_page_item” so you would need to add a CSS style to .current_page_item (making sure you target inside the widget).

    Thread Starter kerer

    (@kerer)

    Hi jkovis, thanks for your answer. Can you be a little more specific? I’m a bit of a noob.

    Where exactly do I need to edit the code to add this css style?

    There should be a style.css file in your theme’s folder, try adding the following to the bottom of it:

    .widget_pages .current_page_item {
        font-weight: bold;
    }

    You may also be able to edit the style.css file via yoursiteurl.com/wp-admin/theme-editor.php

    Thread Starter kerer

    (@kerer)

    Yaaaaay, thanks so much jkovis! It worked – you totally made my day – been wanting this for a long time. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pages Widget – Bolding Current Page’ is closed to new replies.