Skip to main content
Atimmy's user avatar
Atimmy's user avatar
Atimmy's user avatar
Atimmy
  • Member for 6 years, 10 months
  • Last seen more than 3 years ago
awarded
comment
Permalink for CPT with taxonomy
Hi Sally, I am studying your code once again. Quick question about the Answer 2 (the latest one), if I use " 'slug' => 'english/question/%task_id%', " when registering the CPT, what would the default achieve page for this particular CPT looks like?
comment
How to get custom taxonomy terms based on another taxonomy?
They are separate taxonomies, nothing to do with children terms
Loading…
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
Yes your code works for my purpose, thank you for your help. the yoast redirection things doesn't hurt much. I was just curious that, can't we tell WP not to generate the post url twice. I thought we can tell WP "if lang for the post is not english, use our custom code for setting up the permalink, do not generate url from the default setting at all
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
or maybe a if lang != "en" ..then use the custom function to setup the permalink instead ...
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
so I think what actually happened was that when I use the custom function code to create different permalink rule for non-english posts, when I click saved, WP use the URL rules FIRST and created the link accordingly, and then right after that, the custom function code update the permalink update, which trigger the yoast seo plugin to create a 301 redirection. if there is a way to hook the function replace the WP permalink setting, it will work perfectly
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
when yoast detect a URL change of a post, in order to avoid 404 page not found, it will automatically create a redirection link. For example, if I create a post with url "example.com/blog/hello-world" and then I update its permalink to "example.com/blog/hello-hello", then yoast will automatically create a "blog/hello-world" ---> "blog/hello-hello" redirection
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
Tried the update code, the site still create chinese URL first before the custom code. Overall, it still works for me, I just have to delete the redirection from yoast plugin, thank you for your help Sally. PS. I still need help with the other question... kindly help me out when you have time. Thank you again!
Loading…
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
yes you are right, it's example.com/<language>/blog....
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
Hi Sally, thank you for the answer. It works like a charm. Only thing I notice is that I have yoast SEO plugin installed, and when I create a new post in Chinese, upon clicking on the save button, it trigger yoast plugin to create URL redirection. Seems like when I save the post, it created chinese character URL permalink first and immediate the custom function takes effect... and since there was a URL changed, it triggered yoast plugin to created an URL redirection.
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
Hi Sally, you are right, I made a typo when I posted the question. My current permalink setting is (1) Custom Structure, (2) /blog/%category%/%postname%/
revised
Loading…
comment
Bilingual WP site: How to achieve different URL sturcture rule based on its language?
Hi thanks for the comments, but the plugin itself doesn't allow you to do different setting per language. I am looking for a custom function solution to this question.
Loading…
comment
add_editor_style to the blog editor view (Gutenberg?)
the editor.css file is located at " {my plugin_folder}\css\editor.css} , add_editor_style( plugins_url( 'css/editor.css', FILE)); seems like the correct file path. I placed the entire block of code inside my main plugin php file...
comment
add_editor_style to the blog editor view (Gutenberg?)
Styles not applying, and then I looked at the source code and my stylesheet is not being included at the edit post page, so for sure it is not working for me.
Loading…