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
- why same category base and single post base don’t work?
- When should you use WP_Query vs query_posts() vs get_posts()?
- When to use WP_query(), query_posts() and pre_get_posts
- WP_Query by just the id?
- Meta_query compare operator explanation
- WP_Query with “post_title LIKE ‘something%'”?
- How to get an array of post data from wp_query result?
- How to get post id of static front page?
- meta_query with meta values as serialize arrays
- How to only display posts whose meta_value field is not empty?
- Get post ids from WP_Query?
- Pagination when using wp_query?
- Exclude post ID from wp_query
- How to print the excuted sql right after its execution
- How to extend WP_Query to include custom table in query?
- How to store and receive variables in WP sessions?
- Should I use Pre Get Posts or WP_Query
- How can i retrieve default post per page value? from settings->reading. And total number of posts?
- Nested meta_query with multiple relation keys
- Is it necessary to use wp_reset_query() in a WP_Query call?
- Can I force WP_Query to return no results?
- Can wp_query return posts meta in a single request?
- Using pre_get_posts with WP_Query
- Find out total number of pages in global query on archive page?
- WP_Query + random
- Resetting post data to previous loop in nested loops
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- $GLOBALS[‘wp_the_query’] vs global $wp_query
- Broken? WP_Query and “attachment” as a post type
- Some doubts about how the main query and the custom query works in this custom theme?
- Order by multiple meta key and meta value [closed]
- Post_count only shows the number of results per page
- Page template query with WP_Query
- meta_query ‘compare’ => ‘IN’ not working
- Query posts only with featured image
- Passing and retrieving query vars in wordpress
- Wp get all the sub pages of the parent using wp query
- What is appropriate flow for custom data from URL in WP_Query?
- How to display page content in a page template?
- Why is “/page/2/” not working?
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- How to merge two queries together
- Posts with at least 3 tags of a list of tags
- Get post count of current loop when using multiple queries on one page
- why ignore_sticky_posts in sticky post query
- Wp_redirect and sending variables
- Multiple relationship for multiple tax_query in WP_Query
- How do I get posts that have a thumbnail in WP_Query?
- Multiple WP_Query loops with Pagination
- How do I query for posts by partial meta key?
- Pagination with custom SQL query
- Return only Count from a wp_query request?
- Using a custom WP_Query with get_template_part loop
- Use REGEXP in WP_Query meta_query key