Tagged Questions
0
votes
1answer
31 views
How to relate the Category to user?
I am developing one new plugin, In that i had a section to create new category, and having the field Created By(listing all the users in this field).
I am storing the category name in WP_terms and ...
2
votes
1answer
299 views
WP Query group/order by category name
I have a requirement for displaying a list of custom post types grouped by category, but in addition to this, each custom post is linked with a meta value (in this example lets say we have a custom ...
0
votes
1answer
33 views
How can I add the custom taxonomy categories to the posts and pages?
I'm trying to build new wordpress plugin.
Additional to the default wordpress categories box in the publishing screen of posts and pages, I want to add another box for custom taxonomy categories , How ...
0
votes
2answers
59 views
How can i call from custom fields to the category editor?
I found this code for custom field add category editor.
I added custom field to the Category.
e.g. My field name is Hastag and i have a Sport category. And i want to call display Sport's custom ...
0
votes
1answer
53 views
How can i listing current category and Featured Category post list?
I have a Featured Post Category. Im marked some post Featured. When i viewing a category page(e.g. Sport), i want to list on sidebar both marked post list (e.g Featured and Sport,)
I tryed with that ...
1
vote
1answer
88 views
How to Make a Category Always Selected?
I'm trying to write a function to make certain terms of default category always selected.
When the user is writing a new post, the term checkbox should be checked and he shouldn't be able to unckeck ...
1
vote
2answers
115 views
prevent post to have multiple categories in my plugin
I'm writing a plugin, I want to prevent posts have multiple categories (i.e same product having category "Samsung" & "Apple"). Any idea on how to use some actions/filters to achieve this using my ...
0
votes
2answers
70 views
how do you prevent showing a particular category on the admin dashboard for specific user roles?
I'd like to prevent the "Featured" category from appearing for certain user roles. To be specific, I want only the admins and editors to be able to see and thus select or unselect that category. ...
1
vote
1answer
264 views
Show add_meta_box by selecting a specific category
In my plugin I want to display an add_meta_box under the WYSISWYG in the new post page, which is no problem and works fine.
But the box should only appear when a specific category (example: category ...
0
votes
3answers
282 views
How can I show posts for a single category?
Is it possible to show posts for a single category? I tried browsing to the URL http://mysite.com/category/foo which does show all of the posts with category foo, but the posts lose their formatting ...
0
votes
1answer
361 views
wp_insert_post_data filter to set category
I am trying to set additional "default" categories. I figured by hooking into the wp_insert_post_data filter, I could use $postarr to set the category. It doesn't seem to be working? Can someone offer ...
0
votes
1answer
160 views
Check if post belongs to any category
I've got a custom post type which displays portfolio items. I display the portfolio category on the page using this code:
<?php
$myterms = get_the_terms($post->ID,'portfolio_category');
...
0
votes
1answer
333 views
How to Show Category List With Corresponding Links?
i want to do a research in Category List Area.
I'll Explain Here...
Now I have 4 Categories Like 1,2,3,4.
First of all it needs to show in the category pages Horizontally.Next is, While Clicking on ...
0
votes
3answers
2k views
How to get Recent Post From Each Category with Thumbnail?
For Example,Now I have 3 Categories Like Food,Transport,Technology.Under These Categories I have Many Posts.Now I Want To Show the Latest Post From Each Category.{How to get Recent Post From Each ...
1
vote
2answers
408 views
Calling clean_term_cache() fails when called in the same plugin that creates terms, succeeds when called separately?
My plugin code is below. In the myPlugin_cleanup() function, I'm creating some categories and assigning term id 1 as the parent.
Due to the known bug with creating categories via script (the ...
1
vote
2answers
292 views
Missing “category_children” option when dynamically creating categories via a plugin
I've isolated the source of a fatal error that's been occurring when a brand new site is previewed just after installing and activating the plugin I'm working on.
The problem appears to be that the ...
2
votes
3answers
3k views
add_action hook for completely new post?
publish_post Runs when a post is
published, or if it is edited and its
status is "published". Action function
arguments: post ID.
-Plugin API Documentation
I've added the publish_post ...
1
vote
1answer
848 views
Filter Categories widget to allow custom sorting?
Man, I can't seem to ever get done with enhancements to WordPress categories. I hope there's more work done on core category options in the future. Especially with the emergence of site theming and ...
0
votes
2answers
285 views
Best/Correct way to add an option to a category
I'm currently writing my first plugin, which will let the site admin/editor use a different image as a background/header for each post/page, and I would also like to have defaults for each category.
...
0
votes
1answer
143 views
Which are the hooks run before/after when a category's deletion?
What are the actions that a plugin can hook on to for processing when the user deletes a category?
1
vote
3answers
836 views
anything like add_meta_box for categories?
I want to add few custom fields to categories. So I am looking for something like add_meta_box but for categories.
Is there any WP function like that for categories?
0
votes
1answer
241 views
Getting a List of Categories for Use in a Plugin?
I need to access a list of all categories for a plugin I'm working on, I know that there is the wp_list_categories template tag for use in themes. What would be the best way of accessing these ...
