Timeline for Automatically add words if duplicate post titles
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 17, 2023 at 19:37 | history | edited | CommunityBot |
replaced http://dk2.php.net with https://www.php.net
|
|
Feb 9, 2019 at 2:32 | history | edited | Justin Waulters | CC BY-SA 4.0 |
Updated code to match op
|
Feb 9, 2019 at 2:21 | comment | added | Justin Waulters |
An if statement shoudl take care of that! I added it to the code, but didn't test it. Please let me know if there are issues. When this filter is executed, it is before the database query, so if the post is being saved to the database for the first time it will not have an ID yet. This if statement only runs our title replacement if this ID is not present.
|
|
Feb 9, 2019 at 2:18 | history | edited | Justin Waulters | CC BY-SA 4.0 |
Updated code to match op
|
Feb 8, 2019 at 20:40 | comment | added | Duy Hữu | But there was a problem, when I edited and updated the post, "Post Titles + Two" changed "Post Title + Two + Two", meaning it would be changed every time I updated !! Is there any way Just change the title when publish, Updates are not altered title? | |
Feb 8, 2019 at 20:11 | comment | added | Duy Hữu | thank you so much, it work!!! <3<3<3 | |
Feb 8, 2019 at 20:09 | vote | accept | Duy Hữu | ||
Feb 8, 2019 at 1:48 | comment | added | Justin Waulters |
Sorry, I forgot that get_page_by_title() needs to be set to look at posts. I tested it and it works now. Please test it with all save cases to make sure you don't get any unexpected results. It may not work perfectly, but it is a good start.
|
|
Feb 8, 2019 at 1:43 | history | edited | Justin Waulters | CC BY-SA 4.0 |
Updated code to match op
|
Feb 7, 2019 at 8:41 | comment | added | Duy Hữu | Thanks for the help, but it doesn't work. I added the code but published the post with duplicate titles, still not adding random words. | |
Feb 7, 2019 at 1:10 | history | answered | Justin Waulters | CC BY-SA 4.0 |