I made this by jQuery:
$('.sidebar-list li a').filter(function(){
return this.href === location.href;
}).addClass('active');
Related Posts:
- wp query to get child pages of current page
- WordPress retrieving meta data for all custom post types in list view
- Search custom taxonomy term by name
- How to get a category in a list item class
- Determine WP_Query parameters from URL
- Get the post permalink within the loop but without additional DB query
- List the 5 most recent child pages
- Multiple instances of Featured Image Query
- Rewrite rule to prettify two $_GET variables while in a new endpoint from a page
- Set order of returned items in the WP_Query() class/function
- Pagination of a WP_Query Loop in a child-page page template
- Need wp_query to return all children and grandchildren
- How to get all child pages in their parent page?
- Search pages that are a child of the current page
- WordPress add_rewrite_rule() cannot visit lower url levels
- How to display an other custom post type in a different custom post type’s archive?
- How to get list of posts from permalinks?
- WP_Query Attachment adds additional attachment count and need to link attachment to post url
- Pagination for blog posts reloading same page [closed]
- Get Child Page IDs by Parent ID
- Exclude parent with child pages from WP_Query
- How to Create a Random List of Child Pages
- Default permalink structure causing Notice: Undefined property: WP_Query::$post
- complex get_posts() query to select child pages
- How to Display Shortcode in the correct location, currently displaying before content after Page Title?
- WP_Query returns different results from get_posts() [closed]
- Loop posts based on permalink term
- When listing child pages run out of memory
- Pagination in html table is not working
- Get a list of ACF Repeater-Fields as array
- Add URL Rewrite Rule To WordPress
- Getting the permalink to the latest post from a category
- Custom Taxonomy Breaks Pages
- wp-query, pull children of parent page
- Get list of all Grandchild Pages
- Customize the Sorting Dropdown in WooCommerce use another list or more page
- Generate custom output on URL with directory
- Show child by slug, while knowing parent ID
- Paginate nested query of child posts
- How to create page that lists tags by initial letter?
- WP_Query doesn’t return some child pages even though the database shows them
- Get a page ancestor from a most viewed list
- Get Child Custom Post Content on Single.php?
- The permalink redirecting to current article on single.php page
- How to save the results of a query as a php file for an autocomplete search bar
- WP Query Args – Title or Meta Value
- WordPress Pagination Not Working – Always Showing First Pages Content
- Whats the difference between post_limits and pre_get_posts?
- Query WooCommerce orders where meta data does not exist
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- What exactly does the ‘s’ parameter search for in WP queries?
- get_posts not finding argument: post_name
- get query’s query string
- Show only oldest post by author
- Revolution Slider Orderby Two Custom Fields
- Get random terms
- Dynamically Override Fancy Title – Part II
- How to run query inside a class with namespace?
- Modify existing query and change order of posts
- Why does the_content not work like others for a set post id?
- Creating a custom search for a specific post type
- How to add post_distinct filter to WP_Comment_Query?
- Query posts intersecting tags and categories
- WP_Query ignoring tax_query when is_singular
- Excluding pages in WP_query using ACF
- Pagination on static Posts page
- WP_Query : Search and Filter Using custom field AND/OR custom taxonomy
- Query all posts if multiple meta key don’t exist
- Check for the main query from the template
- How do I turn these values from MYSQL into an array
- get_posts() and global variables
- Use Ajax To filter posts?
- Get user posts with custom WP_Query on author.php
- Getting the post terms ‘wp_get_post_terms’ per post when within the functions.php file
- Posts Query | Query to only show sub categories
- WP Query and date format
- How to Order By Two Custom Fields?
- Display specific page (that is child) content on parent page
- WP_query problem -spurious results
- Avoid duplicate while merging two query post
- How to create single page site in WordPress
- Execute PHP function inside the admin area
- Form checkbox value going to dynamic URL
- I need query_posts() to order results first by a meta value and then by post ID
- Pre_get_posts only show posts by administrator roles
- Custom category page with taxonomy filters
- How do i query woocommerce booking post type on init action?
- WP_Query Not Working with Variable
- Random posts in WP_Query when searching by tag
- How To Use WP_Query To Get The Custom Post type Posts With Keywords
- Pagination returns 404 after page 20
- ‘s’ term in WP_Query extended class causes huge memory leak (268MB)
- Compare meta key separation
- meta_query dates from an array
- Creating array to compare custom field values
- WordPress Query Default Order if Meta Values Same?
- Having trouble using this post category query on multiple pages?
- Exclude post formats in custom loop
- shortcode with $atts with strange results
- Show number of posts AND number on current page (cannot make it work)