Title: Automating
Last modified: January 7, 2022

---

# Automating

 *  Resolved [shmickmick2016](https://wordpress.org/support/users/shmickmick2016/)
 * (@shmickmick2016)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/)
 * Hi there, to put “Previous Post” “Random Post” “Next Post” buttons at the bottom
   of the sample post I included, I have manually added the code below.
 * [https://www.bigbreathathome.com/burden-of-speaking-up/](https://www.bigbreathathome.com/burden-of-speaking-up/)
 * ———-
 *     ```
       <div style="text-align: center;">.</div>
       <div class="row">
         <div class="column"><a class="button" href="https://www.bigbreathathome.com/burden-of-speaking-up/?redirect_to=prev">Previous Post</a></div>
   
         <div class="column"><a class="button" href="https://www.bigbreathathome.com/?redirect_to=random">Random Post</a></div>
         <div class="column"><a class="button" href="https://www.bigbreathathome.com/burden-of-speaking-up/?redirect_to=next">Next Post</a></div>
       </div>
       ```
   
 * —–
 * It’s exactly how I want it to look – fantastic!
 * However, I need to add the slug of that specific url to make the “prev” and “
   next” parameters work. In that case, I need to manually put it in the code at
   the bottom of every post I have ever written (100+) and will ever write.
 * Is there any way to have that same effect happen automatically, either by adding
   some universal code somewhere without having to manually add into each singular
   post written? Or so I don’t have to change each individual slug?
 * Thanks for a great plugin, by the way!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fautomating%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [airdrummer](https://wordpress.org/support/users/airdrummer/)
 * (@airdrummer)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15231033)
 * usually your theme’s templates contain next/previous nav links…so mai-lifestyle-
   pro doesn’t?
 *  [airdrummer](https://wordpress.org/support/users/airdrummer/)
 * (@airdrummer)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15232028)
 * sorry i just realized that all u need is
 *     ```
         href="?redirect_to=prev"
         href="?redirect_to=random"
         href="?redirect_to=next"
       ```
   
 *  Thread Starter [shmickmick2016](https://wordpress.org/support/users/shmickmick2016/)
 * (@shmickmick2016)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15232588)
 * I would prefer to use your plugin rather than the theme default so as to keep
   uniformity.
 * I first tried that code but it wasn’t working like it should — when I clicked
   on the “prev” link it redirected to a specific random page (the same page no 
   matter which post) and the “next” link redirected to the blog home page every
   time.
 * You can see here where I put the above code in just for this following post —
   
   [https://www.bigbreathathome.com/no-changes-in-strangers/](https://www.bigbreathathome.com/no-changes-in-strangers/)
 * Any ideas?
 *  [airdrummer](https://wordpress.org/support/users/airdrummer/)
 * (@airdrummer)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15233200)
 * no, u hard-coded the absolute url: `href="https://www.bigbreathathome.com/?redirect_to
   =prev"`
    so of course it didn’t do what u want…u need the relative url: `href
   ="?redirect_to=prev"`
 * [https://stackoverflow.com/questions/2005079/absolute-vs-relative-urls](https://stackoverflow.com/questions/2005079/absolute-vs-relative-urls)
 * ps: i’m not the plugin’s author, just a grateful user:-)
 *  Thread Starter [shmickmick2016](https://wordpress.org/support/users/shmickmick2016/)
 * (@shmickmick2016)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15233301)
 * Fucking brilliant! Thanks very much for the clarification. Sorry, I’m more of
   an amateur 🙂
 *  [airdrummer](https://wordpress.org/support/users/airdrummer/)
 * (@airdrummer)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15233824)
 * url101…glad2b of service;-)
 *  Plugin Author [Christoph](https://wordpress.org/support/users/camthor/)
 * (@camthor)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15235079)
 * Thank you, [@airdrummer](https://wordpress.org/support/users/airdrummer/), for
   your great support!
 *  [airdrummer](https://wordpress.org/support/users/airdrummer/)
 * (@airdrummer)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15236301)
 * u r most welcome, [@camthor](https://wordpress.org/support/users/camthor/)!-)
 * [@shmickmick2016](https://wordpress.org/support/users/shmickmick2016/), u should
   add that boilerplate to the theme’s templates so u don’t have to manually code
   it into every page…that’s why we invented computers, no?-) study up:
    [https://developer.wordpress.org/themes/basics/template-hierarchy/](https://developer.wordpress.org/themes/basics/template-hierarchy/)
   [https://codex.wordpress.org/Next_and_Previous_Links](https://codex.wordpress.org/Next_and_Previous_Links)
 * ” add the code to your theme’s page template instead: “
    -  This reply was modified 4 years, 5 months ago by [airdrummer](https://wordpress.org/support/users/airdrummer/).

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Automating’ is closed to new replies.

 * ![](https://ps.w.org/redirect-url-to-post/assets/icon-256x256.png?rev=1742449)
 * [Random Post Plugin - Redirect URL to Post](https://wordpress.org/plugins/redirect-url-to-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirect-url-to-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirect-url-to-post/)
 * [Active Topics](https://wordpress.org/support/plugin/redirect-url-to-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirect-url-to-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirect-url-to-post/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [airdrummer](https://wordpress.org/support/users/airdrummer/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/automating/#post-15236301)
 * Status: resolved