Babak Fakhamzadeh
Forum Replies Created
-
Forum: Plugins
In reply to: [Co-Authors Plus] get_coauthors_ids_arrayI think you’ll have to go through get_coauthors().
Forum: Plugins
In reply to: [WP Scroll Depth] Cannot see any events firingIt seems I have the same problem. Was the sticky header the issue?
Forum: Plugins
In reply to: [Polylang] How to know the language of a post through the WordPress REST APIThanks!
Forum: Plugins
In reply to: [Polylang] How to know the language of a post through the WordPress REST APIThanks. But, it seems I don’t know how to use this. I get:
Fatal error: Call to undefined function register_taxonomy_args()
Forum: Plugins
In reply to: [Polylang] How to know the language of a post through the WordPress REST APIThe plugin author is not planning to add this to the free version. The pro version will get something that could provide for this.
To make this work yourself…Add something like this to your functions.php;
function wpse_modify_taxonomy() { // get the arguments of the already-registered taxonomy $language_args = get_taxonomy( 'language' ); // returns an object // make changes to the args // in this example there are three changes // again, note that it's an object $language_args->show_in_rest = true; // re-register the taxonomy register_taxonomy( 'language', 'post', (array) $language_args ); } // hook it up to 11 so that it overrides the original register_taxonomy function add_action( 'init', 'wpse_modify_taxonomy', 11 );Forum: Plugins
In reply to: [Polylang] How to know the language of a post through the WordPress REST APIThanks a bunch!
Forum: Plugins
In reply to: [Polylang] How to know the language of a post through the WordPress REST APIThanks. This does not seem to be working, though. At least not out-of-the-box. The endpoint
http://mysite.com/wp-json/wp/v2/taxonomies
only returns the two default taxonomies, “category” and “post_tag”.
Explicitly asking for the “language” taxonomy like so:
http://mysite.com/wp-json/wp/v2/taxonomies/language
returns a “Sorry, you are not allowed to do that.”
In addition, the posts endpoint only seems to allow for matching posts on category or tag:
https://developer.wordpress.org/rest-api/reference/posts/
I suppose it’s possible to create a custom route which queries posts based on their language. The overview for this would be here:
https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/
However, this hardly could be called ‘easy’ and requires customisation of the WordPress installation. :/
Am I missing something obvious in relation to the REST API?
- This reply was modified 9 years, 1 month ago by Babak Fakhamzadeh.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Unable to get custom icons workingThe problem is that a featured image for a marker overrides the default icon set by the code above.
Forum: Plugins
In reply to: [AddToAny Share Buttons] Counter Reset to 0 alsoI had my counters set to zero after installing a plugin that adds twitter/facebook/google cards data as meta tags. This happened without changing any of the URLs.
Forum: Fixing WordPress
In reply to: I've been Hacked and need helpHad the same thing happen to a friend.
It appears to me that the most likely cause is the server being compromised, not the WordPress environment.
Forum: Plugins
In reply to: [Really Simple CSV Importer] Action hooks?Thanks. Looking good.
Forum: Plugins
In reply to: [Ajax Archive Calendar] Suggested changesI went ahead and made the changes I suggested.
Here’s a link to the updated file:
https://dl.dropboxusercontent.com/u/401802/code/aca.php.zip
Feel free to update your plugin with this.
Forum: Plugins
In reply to: [Simple Staff List] Getting 404 error from list -> staff member pageSame here.
Thanks for the quick response!
That’s what I expected, but wasn’t working for me.
In your header file, you check for
is_home(), but this only works on a posts-page as the home page.
Perhaps the check should beis_front_page()?I’m not seeing that setting in quickedit, nor in regular edit. 🙁