- This topic has 8 replies, 3 voices, and was last updated 4 years, 8 months ago by Leo.
-
AuthorPosts
-
August 13, 2019 at 3:12 am #982704Mark
Hi guys,
I hope you are all well? Was hoping you could help?
We have created some thumbnail galleries and categories using the Content Views Pro plugin.
For some reason though when using WordPress ‘Portfolio’ CV puts this (?tx_portfolio_cat=) in the url which is really annoying. Below is a test where we are trying to include the category name in the url, like ‘toys’.
https://gravity360.co.uk/360-2/product-photography/gallery/?tx_portfolio_cat=toysIdeally I would like this below:
https://gravity360.co.uk/360-2/product-photography/gallery/toys
or just:
https://gravity360.co.uk/360-2/product-photography/toysI 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.
Do you have any ideas on how we could exclude this code, with CSS perhaps?
Or would this break the way it sorts the categories etc?
As always, any help greatly appreciated.
Thanks, Mark
August 13, 2019 at 5:16 am #982790DavidStaffCustomer SupportHi there,
that is a query string, as the content is dynamically being displayed it is required.
You can’t alter it with CSS, it would require custom development – and it sounds like the plugin author is reluctant to provide assistance with that.August 13, 2019 at 6:34 am #982848MarkHi David,
Thanks for your reply, helpful as always!
Could something like this work do you think, option 1 using the ‘Code Snippets Plugin’?
https://kinsta.com/knowledgebase/remove-query-strings-static-resources/With regards to Cv support, I am not sure if this is because it cannot be done. Just that they are maybe not interested in doing it or coming up with a solution.
Thanks again for any suggestions/help.
Cheers, Mark
August 13, 2019 at 7:58 am #983081MarkI just wondered if I could modify this code (entered into the Code Snippets Plugin) to hide this (?tx_portfolio_cat=) from appearing in the url on the front end of the site?
Let me know whether you think this may be possible? Thanks, Mark
Code:
function remove_query_strings() {
if(!is_admin()) {
add_filter(‘script_loader_src’, ‘remove_query_strings_split’, 15);
add_filter(‘style_loader_src’, ‘remove_query_strings_split’, 15);
}
}function remove_query_strings_split($src){
$output = preg_split(“/(&ver|\?ver)/”, $src);
return $output[0];
}
add_action(‘init’, ‘remove_query_strings’);August 13, 2019 at 8:31 am #983113LeoStaffCustomer SupportYou can absolutely try and see if that works for you.
If not then you will need bug the plugin support some more.
Unfortunately, we have to limit the support we provide for other plugins.
Thanks for your understanding π
August 13, 2019 at 9:08 am #983160MarkHi Leo,
Thanks for your reply.
If you can offer a suggestion/solution that utilises GP/CSS (something else) and not a 3rd party Plugin I would still be keen to very hear it!
Please try me as I am close to exhaustion on this issue.
Thanks so much.
Cheers, Mark
August 13, 2019 at 9:11 am #983165LeoStaffCustomer SupportCSS cannot modify the URL structure as David already mentioned. It will require custom development of modifying the code within the plugin.
I would recommend bugging the plugin developer some more.
Sorry we couldn’t be more helpful π
August 13, 2019 at 9:12 am #983167MarkHi Leo, OK – thanks so much anyway. Cheers, mark
August 13, 2019 at 9:21 am #983178LeoStaffCustomer SupportNo problem π
Good luck!
-
AuthorPosts
- You must be logged in to reply to this topic.