Reputation
39,667
Next tag badge:
96/100 score
52/20 answers
Badges
3 45 114
Newest
 widgets
Impact
~2.1m people reached

Apr
25
comment Main menu not appearing on category pages
A few things: 1) remove the 'menu' parameter from your wp_nav_menu() call. Only use 'theme_location'. 2) What is your "category page"? The category archive index (category.php) or a custom page template? Or something else? 3) Can we see a live link that demonstrates the issue?
Apr
25
comment current_page_item is missing inside wp_nav_menu
So, did you attempt the solution steps? Did they work?
Apr
25
comment current_page_item is missing inside wp_nav_menu
"But I need this class" - wp_nav_menu(), by default, outputs the .current-page-item class. You don't need a Walker to add it.
Apr
24
comment Passing a variable from the archive page to the default template
What variable? And how is it used in the template-part file markup?
Apr
24
comment How to make posts appear under pages
You will need to use Custom Page Templates, that have custom/secondary queries, that show posts from a given category.
Apr
24
comment Is there an atomic way to update_option in Wordpress (to ensure data integrity)?
Why are front-end user data being stored as an option? You're describing content, which gets stored as posts.
Apr
24
comment Is there an atomic way to update_option in Wordpress (to ensure data integrity)?
How does that happen, though? How do you envision two separate sessions attempting to modify settings? You're taking the 5-inch view of the problem. Pan out to the 5-feet view, or the 50-feet view. What's the scenario?
Apr
24
comment Is there an atomic way to update_option in Wordpress (to ensure data integrity)?
Can you elaborate? What is the use case? What's the scenario you're attempting to cause or prevent?
Apr
24
comment Is there an atomic way to update_option in Wordpress (to ensure data integrity)?
You should try using the Settings API.
Apr
24
comment current_page_item is missing inside wp_nav_menu
More accurately, the Walker class is irrelevant.
Apr
23
comment Generate Navbar In WordPress
Seems like overkill for something a few lines of CSS could fix.
Apr
23
comment How to share post?
"HOw do I change the one for pinterest and mail to" - that question is not specific to WordPress.
Apr
23
comment How to share post?
Much better, thanks. Now: assuming you want to replace "url=http://www.alskadehem.se" with a post-specific URL, what have you tried?
Apr
23
comment How to share post?
Please trim your code to highlight just the post-sharing.
Apr
23
comment Problems With Query and/or Template Part and/or PHP
In your first example, why are you running the custom query twice? Also, you con't call wp_reset_postdata() after the second iteration. Where is the actual failure taking place? Is the template part file being included or not being included? If it is being included, please edit your question to include its markup, and describe where within that markup the failure is taking place.
Apr
23
answered current_page_item is missing inside wp_nav_menu
Apr
22
comment Adapting a php array to WordPress
Except, make that a curly quote not a curly brace. Derp.
Apr
22
comment Adapting a php array to WordPress
This is a PHP syntax question, not specific to WordPress. The problem is an incorrect character (a curly brace) closing the 'api-key-here' string. Note 'api-key-here' vs 'api-key-here’.
Apr
22
comment The loop does not show users
Have a look at pre_get_posts and is_author(), and see if you can come up with a starting point.
Apr
22
comment The loop does not show users
The author.php template file by default only shows posts of the post post-type. What have you done to filter the main query to display posts of other post-types?