1320 posts
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a Free File of the Month
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
+1 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 been a member for 5-6 years
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Poland
  • Referred between 10 and 49 users
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 :)

1320 posts
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a Free File of the Month
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
+1 more
fuelthemes says

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

by
by
by
by
by
by