Title: passing variable
Last modified: August 19, 2016

---

# passing variable

 *  [lobos55](https://wordpress.org/support/users/lobos55/)
 * (@lobos55)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/passing-variable/)
 * On my index page I show posts from the last 2 days. For the continuation I created
   a category page, which should start where the index ended. So I count the number
   of displayed posts on the indexpage into a global variable.
    How can I pass that
   global variable to the category page to use it as offset parameter?

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

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/passing-variable/#post-1223077)
 * see if this helps
    [http://codex.wordpress.org/Function_Reference/add_query_arg](http://codex.wordpress.org/Function_Reference/add_query_arg)
 *  Thread Starter [lobos55](https://wordpress.org/support/users/lobos55/)
 * (@lobos55)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/passing-variable/#post-1223158)
 * stvwlf
    Thanks. It is probably the only way to do it, but I had hoped there would
   be a way to avoid doing it via the URL.

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

The topic ‘passing variable’ is closed to new replies.

## Tags

 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [lobos55](https://wordpress.org/support/users/lobos55/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/passing-variable/#post-1223158)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
