This topic has 6 replies, 3 voices, and was last updated 5 years, 5 months ago ago by Olga Barlow
Hello,
I added in child/footer.php this code:
<script>
jQuery(document).ready(function(){
jQuery('[data-filter=".sort-0-in-evidence-it"]').trigger( "click" );
});
jQuery(document).ready(function(){
jQuery('[data-filter=".sort-0-in-evidence-en"]').trigger( "click" );
});
jQuery(document).ready(function(){
jQuery('[data-filter=".sort-0-in-evidence-cn"]').trigger( "click" );
});
</script>
in order to have in any language the button “in evidence” (its slug is “0-in-evidence-it” for Italian, “0-in-evidence-en” for English, “0-in-evidence-cn” for Chinese) loaded ad first choice instead of “Show all”.
My question is:
Could I insert this code directly in the portfolio page in order to have these instructions called only on that page instead of every page of the website (even if when not necessary)?
Other question:
There is a way to call a category of the Portfolio (for example “Editorial content”) by a link? Namely, open the page with this button selected.
Maybe sometimes like: sitename.com/en/portfolio?filter=.sort-9-editorial-contents-en (where “9-editorial-contents-en” is the slug of that category in English). I know that a link in this way doesn’t work, but I would like to know how to write it
Hello,
1) Try to use Raw JS element http://prntscr.com/mesy07 or add the code into portfolio.php file.
Please note that additional customization in files is not included in basic support.
2) If you need help with the additional customization, submit customization request to WPKraken team – https://wpkraken.io/?ref=8theme
Regards
Hello,
1) Thanks for the suggestion, I add the code into portfolio.php and it works perfectly.
2) I understand very well that this customization is out of the service you offer, but I thought it was a very simple thing and it needed just a few seconds for you to tell me how to pass those parameters through a link, admitting that it is possible to do so (I have no idea at this point.. for this reason I asked to you that made the Theme)
Hello,
Do you want to add the link for some button to be able to open the portfolio page and make the necessary category active from the beginning? Or it would be better for you to open the portfolio category page with projects that this category includes without filter by other categories?
Regards
The first thing you said.
Namely, on the portfolio page now I have
Category1 – Category2 – Category3 – Category4
If I open the link normally from the menu it obviously loads the selected Category1 button (thanks to the script above, otherwise I had “Show All”).
I would like to have a link to load (when necessary) the same page with eg Category4 already selected.
Hello,
Ok. We’ll implement it in the next theme update.
Regards
You must be logged in to reply to this topic.Log in/Sign up