529 reputation
316
bio website
location
age
visits member for 2 years, 10 months
seen Jan 23 at 3:53

Jan
16
comment How to add category to: 'wp-admin/post-new.php'?
I thought by adding the code into functions.php that when I tick a category, it would add that parameter to the end of the string like in the photo above. I am trying to add a metabox to only a specific category. Then I will use $_GET to test if I am in the correct category to load the metabox. When I tried the code and tried to replicate what is in your photo above, nothing happened. All I got was wp-admin/post-new.php. I am trying to get wp-admin/post-new.php?post_cat=audio
Jan
16
comment How to add category to: 'wp-admin/post-new.php'?
I tried this solution by pasting the code into my functions.php file and it didn't work. Am I missing something? Do I need to do more like call the function to make it do the job?
Jan
15
comment getting post data in functions.php
no joy. I really don't understand this. I have this code working in a different theme on another install. Maybe something else is going on. I will have to look into it further
Jan
15
comment getting post data in functions.php
says Post not found in global space
Jan
15
comment getting post data in functions.php
no, unfortunately it isn't working. It's like the post variable is empty. The errors are gone but the metabox does not show in any category
Jan
15
comment getting post data in functions.php
there is an action. I will edit the code to show that.
Jan
9
comment add custom option to get_categories dropdown
no, There is only the code I posted above. That alone generates my select box.
Dec
30
comment menu is only pulling in one item
A link to the site would be helpful. Also, list what settings you have in the admin area for your menu. Is the primary location set for the "navigation" menu? Does the navigation menu in the admin area have more than one item in it? Did the client mess with the menu? Have you installed any plugins lately that could be messing with it?
Dec
29
comment Pre_get_posts to exclude latest posts of a custom taxonomy, can't find the error
even when you get a blank page, sometimes if you view the source code, there is an error that shows. Are you getting one?
Dec
27
comment WP_Query condition affects posts_per_page count
ok, never mind that. Thought it might be worth a try. I found an article on here that might help wordpress.stackexchange.com/questions/100585/…
Dec
27
comment WP_Query condition affects posts_per_page count
Maybe they changed it to codex.wordpress.org/Function_Reference/get_next_post
Dec
27
comment WP_Query condition affects posts_per_page count
try using next_post(); So you could try. if !has_post_thumbnail() do content else $the_query->next_post(); I don't know if that would work. I have never used it
Dec
27
comment WP_Query condition affects posts_per_page count
how many posts do you have in your category? Do you have more than two that don't have a featured image?
Dec
23
comment how to get value of wp_dropdown_categories
Thanks Sven, My main issue what I wasn't sure how to write up the select in php while getting the values from the database. What really surprises me is the lack of information in the codex.
Dec
22
comment instance is empty in function widget()
Thanks Peter. I will try this when I get home in a few hours. I did start with the widget API. That is where I got the bare bones for the widget. the version I had posted was after several hours of trying to figure out what was wrong. I did also try the get categories for the dropdown. After hours of trying, I succeeded with wp_dropdown_categories which is why I went with it. I appreciate your help and will study your working example to improve my code in the future.
Dec
22
comment instance is empty in function widget()
I only added that after following other blogs from reputable sources when things weren't working. I have checked line by line and don't see the issue
Dec
22
comment instance is empty in function widget()
This issue is a complete and total different issue. I have the values, they are in the database. My new problem is that the $instance array that is supposed to get passed to the widget function to display on the front end is emtpy. I can't make the suggested change in the previous post because I am not using that information. it is irrelevant to this question. There is no get_tags or get_categories being used in my widget at this time.
Dec
22
comment how to get value of wp_dropdown_categories
Peter, this is in no way a duplicate of that question. I do not even have a loop yet in my code. the correct answer to this question is not even close to what was posted in that other question. I have found the answer to this question and will post it when I get all the code working. I am not using get_tags or get_categories at all at this stage. All I needed to do to get the values was add some options to the wp_dropdown_categories function. then I could do a print_r($instance) and see that my values are there. I could also find them in the database. So now I know how to get the values.
Dec
22
comment how to get value of wp_dropdown_categories
can you post a code snippet to show what you mean Sven ? I have not been able to get this working
Dec
21
comment how to get value of wp_dropdown_categories
I want to make a category loop based on the chosen category