Best answer

Replace part of a url with new post id


Userlevel 1
Badge

I’m looking to replace part of a url with a new id that will come through a field in a google sheet. 

The url roughly looks like this: example.com/wp-admin/post.php?post=15038&action=edit and I’m looking to replace that post id with a different one.

Is there a way to do this with text formatter? 

icon

Best answer by Troy Tessalone 8 March 2023, 20:13

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +14

Hi @lmarins 

Good question.

Is the value you are trying to replace in the URL static or dynamic (changing)?

If the value is static, then you can use Formatter > Text > Replace

Userlevel 1
Badge

@Troy Tessalone oh yes that worked thank you!