1345 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
  • Has sold $250,000+ on Envato Market
+6 more
fuelthemes says

Hi everyone,

I am using add_query_arg and remove_query_arg to display classic portfolios with pagination here:

http://ux.turkhitbox.com/classic-3-columns/

Basically, you can go to http://ux.turkhitbox.com/classic-3-columns/?skill-type=portfolio-gallery

to go to a different portfolio type, but there is a problem if you are using permalinks.

When you go to the page 2:

http://ux.turkhitbox.com/classic-3-columns/page/2/

and click on a different portfolio type:

http://ux.turkhitbox.com/classic-3-columns/page/2/?skill-type=portfolio-gallery

It brings an empty page, since I cannot remove the pagination (/page/2) using remove_query_arg

Is there anyway I can get the base url of the page?

PS: I am using the pagination by Kreisi: http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin

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

Well, this is tricky! What does get_the_permalink() return when you are in the main loop (before calling the portfolio loop)? If it returns the proper page permalink without /page/2/ this is the way to go :)

1345 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has been part of the Envato Community for over 5 years
  • Has sold $250,000+ on Envato Market
+6 more
fuelthemes says

I guess that worked, but can’t be too sure before some buyers tests it :)

by
by
by
by
by
by