Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will this work with programmatically-added content? #86

Open
robertandrews opened this issue Mar 21, 2018 · 1 comment
Open

Will this work with programmatically-added content? #86

robertandrews opened this issue Mar 21, 2018 · 1 comment

Comments

@robertandrews
Copy link

Hi,

When does this plugin work?

I have a custom post type, "Quotes", registered using register_post_type( 'quote', $args ); and code options.

I have a script running on cron which finds quotes in public news content and inserts them as a "quote" post, using wp_insert_post and wp_publish_post, and maybe wp_update_post. post_name may be used in some cases.

By default, created "quote" post slugs are versions of the title (although the Permalinks setting for standard Posts is different). As it happens, it is currently problematic, because I find duplicate slugs are getting saved for posts with the same legitimate headline.

Could your plugin help me?

ie. If I run your plugin on my custom post type "Quotes", will all "Quotes" posts adopt the specified permalink structure even if they are created programmatically by a script? In other words, will your plugin take control? Or will everything still be run by the script?

What about if I don't manually set post_name in the script? Would the plugin then take over?

Thanks.

@torounit
Copy link
Owner

@robertandrews sorry for the late reply.

This plugin set permalink all posts of the post type.

Can not change permalinks for each post with this plugin.

I think that it is possible using add_rewrite_rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants