Skip to main content
11 events
when toggle format what by license comment
Feb 18, 2016 at 11:18 comment added Adam if you use just get_value('key') then you must be inside the_loop otherwise you have to do get_value('key', $posd_id), but you need to know the post_id and the way to do that is to query the posts in taxonomy term.
Feb 18, 2016 at 11:07 comment added pagol007 i remove wp_query .. but not work. for custom filed i use advancedcustomfields plugins. i have no idea thats table. but i know how to get value from advancedcustomfields i did it but not work. i think if i just get value from my updated code then will be fine. my updated work fine for category title and permalink
Feb 18, 2016 at 10:57 comment added Adam @pagol007 If you don't want the posts to come along with the category, then get rid of the call to WP_Query. The issue however is you want to bring a custom field along with the Category title and link, ok... Where is that metadata (custom field) stored? In postmeta, usermeta or assigned against category? What table...?
Feb 18, 2016 at 10:55 comment added Adam @PieterGoosen who me? If so... I know, right now I am not addressing that, it is an adhoc copy and paste from the OPs original code. Just trying to get on the same page as him in terms of what he wants because in one instance he says one thing and in another - something else. :)
Feb 18, 2016 at 10:50 comment added Pieter Goosen Your code is quite expensive to run and hits the db quite hard ;-)
Feb 18, 2016 at 9:58 comment added pagol007 nah it is result same. only title come also 2 post come. too. i think this query $posts = new WP_Query( "taxonomy=$taxonomy&term=$term->slug&posts_per_page=2" ); .. page post per page. i dont want post per page. i want only category title. i updated new code that is fine disply only category with permalink but no idea inside there how i can get custom filed value
Feb 18, 2016 at 9:47 comment added Adam I made an edit to the example above... try that.
Feb 18, 2016 at 9:46 history edited Adam CC BY-SA 3.0
deleted 10 characters in body
Feb 18, 2016 at 9:46 comment added pagol007 i got one code. which is bit work. you can check. i just updated my post
Feb 18, 2016 at 9:15 comment added pagol007 thanks for your great help. actually now showing category with two other post. and post link i want only woocommcer category and category link and costume filed value. costume value not coming now. only coming category title. permalink coming from product post. i only want category name. with category links and custom filed value i think my query having problem.
Feb 18, 2016 at 8:00 history answered Adam CC BY-SA 3.0