Display posts from an author using search parameters (not author template/query_posts)
This is what I was looking for: /?s=+&author_name=username
This is what I was looking for: /?s=+&author_name=username
I encountered a very similar situation, and I believe it may very well be the same situation you are experiencing. Please read the WPSE question Programmatically insert hierarchical terms & set terms for post causes glitch? and follow up with the answer provided by @Manny Fleurmond.
try this.. $filter_terms = array(); foreach ($widget[‘select’] as $key => $name) { $filter_terms[$key] = get_term_by( ‘name’, $name, ‘portfolio-categories’); }
This is a known issue see Custom taxonomy count includes draft & trashed posts. It might not be fixed in version 3.2 but most likely in the next version.
Short answer: No. When you’re working with SEO, there are three things to take into account: Site content Site meta descriptions Site findability (it’s a word, I swear!) Site Content Search engines will parse your site’s content looking for content and keywords. Create good, useful content and it will be fetched, parsed, and recorded appropriately. … Read more
Use get_ancestors() and count the returned array: that’s the number of ancestors a term has. /** * Count a term’s ancestors. * * @param int $term_id * @param string $taxonomy * @return int */ function wpse_57512_count_ancestors( $term_id = FALSE, $taxonomy = FALSE ) { if ( FALSE === $term_id and ! empty ( get_queried_object()->taxonomy ) … Read more
You’d write a script to loop through a file you created with the data, and process each line one at a time. Inside the loop you’d have code like the following. You would, of course, replace my example values Scotland, Glasgow, its description and its slug with variables representing the data for the row being … Read more
This can be done with jQuery. In this example, the modifier is printed when editing an existing post (admin_head-post.php) and when writing a new one (admin_head-post-new.php). There’s a condition to check for the correct post type, as this hooks work with posts, pages and custom post types. The “Most used” tab is being hidden. To … Read more
So, to answer my own question: I haven’t found any solution inside wp_insert_post_data. I suspect that the problem is connected to the fact that when wp_insert_post_data is executed the post in question is not yet in the database. And albeit I didn’t manage to find it in taxonomy.php, it is logical to assume that the … Read more
Per your comment (and hopefully an edit to the question) : I did it like so: foreach ( $termchildren as $child ) { $term = get_term_by( ‘id’, $child, $taxonomy_name, array( ‘orderby’ => ‘name’, ‘hide_empty’ => 0) ); Formatted: foreach ( $termchildren as $child ) { $term = get_term_by( ‘id’, $child, $taxonomy_name, array( ‘orderby’ => ‘name’, … Read more