1642 posts
  • Power Elite Author
  • Featured Author
  • 7 Years of Membership
  • Author Level 12
+8 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

743 posts
  • Elite Author
  • Weekly Top Seller
  • Featured Item
  • Most Wanted Winner
+5 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 :)

1642 posts
  • Power Elite Author
  • Featured Author
  • 7 Years of Membership
  • Author Level 12
+8 more
fuelthemes
says

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

by
by
by
by
by
by