New answers tagged

0

You will find the Codex Action Reference handy - while it doesn't list everything, it gives a good overview of action order which can help locate the correct action if the one you're using runs too late. In your case, wp does indeed run after the query is run, but looking at that list it appears - depending exactly on what logic you're wanting to run - that ...


0

I might be completely missing what you want here, but it sounds like you're saying you want the parent category's slug to echo out, rather than the parent category's human readable name. Rather than this: echo $parent->name; You just need this instead: echo $parent->slug; You can see a list of the properties here that are returned by the ...


1

Inserting boolean term meta values When we add non-existent term meta with e.g. add_term_meta( 123, 'test', true ); then we are actually running the following insert : $wpdb->insert( 'wp_termmeta', array( 'term_id' => 123, 'meta_key' => 'test', 'meta_value' => true ) ); within the general add_metadata() function. Now wpdb::insert(...


0

If I understand you correctly, you're basically wanting to grab one post from each taxonomy term. And then get that post's link. WP_Query is your friend here - with a custom query, you can get posts with almost any criteria you want (check the docs I've linked to there, they outline almost everything you can do). The criteria in this circumstance is a ...



Top 50 recent answers are included