• Hi everyone,

    I hope you are all well? Was hoping someone may be able to help here?

    We have created some thumbnail galleries and categories using the Content Views Pro plugin.

    When using WordPress ‘Portfolio’, Content Views Pro Plugin puts this “?tx_portfolio_cat=” in the url which isn’t visually nice or good for SEO. I think it is something to do with sorting the right pictures into their chosen categories. It is required but I was hoping to somehow hide the “?tx_portfolio_cat=” from the front-end somehow, so that it doesn’t appear in the URL.

    Below is a test where we are trying to include the category name in the url, like ‘toys’ for example. This is what we are getting below:
    https://gravity360.co.uk/360-2/product-photography/gallery/?tx_portfolio_cat=toys

    However, ideally I would like this below:
    https://gravity360.co.uk/360-2/product-photography/gallery/toys

    I have been trying to resolve this with CV but they say removing these random letters etc are impossible. What is frustrating is that if the CV galleries were setup as a post then this problem would not exist. I think it is WP’s ‘Portfolio’ that adds the query string.

    Do you have any ideas on how we could exclude this query string from the front end. I did see this post and wondered if it might work with a tweak to the code (using Code Snippets Plugin option)?
    https://kinsta.com/knowledgebase/remove-query-strings-static-resources/

    Any help would be greatly appreciated.

    Thanks, Mark

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • You need to either resolve this with the plugin’s author or change the plugin yourself.
    WordPress does not supply a Portfolio, so it is not a WordPress problem.

    Thread Starter markkingphoto

    (@markkingphoto)

    Hi Joy, thanks for your reply.

    I am using ‘WordPress / Dashboard / Portfolio’ for the content contained within these galleries. The reason I thought ‘WP / Portfolio’ was adding the query string is because when these galleries are added to the ‘WP / Blog’ as a ‘Post’ this text does not appear in the url.

    Like on this site below, which is also using the Content Views Pro plugin. However, they don’t have the query string in their urls.
    https://www.whatsupfagans.com/category/motherhood/pregnancy/maternity-clothes/

    Any help or clarification greatly appreciated.

    Thanks, Mark

    Moderator bcworkz

    (@bcworkz)

    Plugins can be pretty tightly integrated into WP, so unless you are vary familiar with “plain vanilla” WP, it’s difficult to know what is WP and what is plugin. I assure you that Joy is correct in that this is all plugin territory regardless of how elements appear in the admin interface.

    I will add that directly modifying plugins is not the best practice. However, there is no reason you cannot add your own plugin that modifies the behavior of other plugins. How feasible this is depends on what you want to accomplish and if the other plugin author provided hooks for you to use.

    Happily, modifying how plugin related URLs are constructed probably does not require any hooks from the other plugin. Your plugin can use the Rewrite API to match a specific permalink structure using a regular expression and rewrite it to an URL using query strings.

    Creating your own plugin may sound ominous, but it really isn’t. It’s mainly a matter of creating a new file that has a properly formatted header. See https://developer.wordpress.org/plugins/plugin-basics/

    Hot tip on rewrite rules: If this will be a one-off rule specific to your own site, do not use the flush_rewrite_rules() function. Simply visit the permalinks setting screen and the old rules will automatically be flushed and new ones regenerated.

    Thread Starter markkingphoto

    (@markkingphoto)

    Hi bcworkz,

    Thanks for your reply and time.

    While your solution sounds great, unfortunately, I feel it is beyond my level of experience. I have taken a good look though but because I am a photographer and not a developer – it all seems like a foreign language.

    Once again, thanks for your time.

    cheers, mark

    Moderator bcworkz

    (@bcworkz)

    You’re welcome. I understand, additionally, regular expressions are particularly vexing. I applaud you at least taking a look. You could implore the plugin authors to improve how data is passed through URLs. Google Search Console has a section where you can pre-define which URL parameters your site uses so its search bots can better parse your URLs. This doesn’t help any with other search engines though. If the improved URL structure is really important to you, you could hire someone to set you up through sites such as jobs.wordpress.net/ or jetpack.pro/. Just don’t solicit paid help here in the forums, it’s against our guidelines.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing “?tx_portfolio_cat=” Query String from WP ‘Portfolio’ URL?’ is closed to new replies.