46 posts
    Has been part of the Envato Community for over 4 years Has sold $1,000+ on Envato Market Sells items exclusively on Envato Market
Codename says

Hey guys, I just uploaded my first wordpress theme and I have to say that TF is great :-) Since I’‘m not a WP expert, I needed some advice.

The problem is that when permalinks are enabled in the theme, the pagination breaks. I’m guessing that this is since the get variables aren’t available to the page once the url has been rewritten. So is there any way that I could retrieve the GET array from the rewritte url?

Thanks.

1734 posts
    Has referred 1+ members Has sold $5,000+ on Envato Market Has collected 1+ items on Envato Market Sells items exclusively on Envato Market
+2 more
VisualSharing says

I believe some code snippet would come in handy here. :)

Good luck with your theme!

193 posts
    Has been part of the Envato Community for over 3 years Has sold $100+ on Envato Market Sells items exclusively on Envato Market
Kontent says

Hi, it doesn’t matter if the url is rewritten, you get it the normal way because the rewritten url acts as the original url.

741 posts
    Has referred 10+ members Has sold $40,000+ on Envato Market Has collected 50+ items on Envato Market Had an item featured on Envato Market
+4 more
Orbital_Themes says
Hi, it doesn’t matter if the url is rewritten, you get it the normal way because the rewritten url acts as the original url.

That’s right. Just make sure you use the WP functions for all pagination links etc. Also set the 'paged' query attribute to get_query_var($paged) and reset query after the loop.

46 posts
    Has been part of the Envato Community for over 4 years Has sold $1,000+ on Envato Market Sells items exclusively on Envato Market
Codename says

Hi Pogoking, I reset the query after the loop, but I don’t understand what you meant by “Also set the ‘paged’ query attribute to get_query_var($paged)” ?? Btw, I have 2 queries on thepage, one for a featured post and then the next query which displays 4 posts with offset = 1. And I calculate the offset for each post based on the page number from the “paged” value of the GET array and offset the query by that number.

Also, since the permalinks do not affect the GET array, shouldn’t I be able to print the array? But when I do so I get an empty variable…

by
by
by
by
by
by