As title says I am trying to have a button on my home page that automatically updates the link with the link of the last blog post in a certain category
Asked
Active
Viewed 406 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Dec 14 '21 at 16:16
1 Answers
0
You need to code shortcode (in child theme functions.php for example or make a plugin), that will generate this button HTML output, fetch last post url and add it to button. Then you can use something like [last_post_button] anywhere where you need.

Dmitry
- 499
- 1
- 3
- 19