Tagged: categories, Portfolio, sorting options
-
AuthorPosts
-
May 15, 2016 at 10:00 pm #632596
Hi,
How can I change the symbol “/” that separates the Portfolio Categories showing at the top of the page? I’d like to use several spaces between items, or “|”. As it stands now, it looks like the navigation structure of the page (sort of like a breadcrumb), instead of just looking like a menu of categories.
Thanks!May 15, 2016 at 10:13 pm #632599Hi webdesign!
Please refer to my post here – https://kriesi.at/support/topic/team-member-email-iconlink-masonry-portfolio-seperator-font/#post-574006. You should modify the helper-masonry.php file instead
Regards,
YigitMay 15, 2016 at 10:32 pm #632602Hi,
Thanks for the quick reply! I am using child themes so I tried adding it to my functions.php file but it didn’t work. I just don’t want the change to be overwritten when I update the theme. Do I need to bring over a helper-mastonry.php file to customize as well?
Thanks!May 17, 2016 at 9:12 am #633565Hi,
Instead of modifying the masonry file, please add this in the functions.php file:
// pipe add_action( 'wp_footer', 'ava_custom_script' ); function ava_custom_script() { ?> <script type="text/javascript"> (function($){ function b() { $('.sort_by_cat').find('.text-sep').empty().text('|'); } b(); })(jQuery); </script> <?php }
Best regards,
IsmaelMay 17, 2016 at 4:03 pm #633810Aaak! I tried that and now my whole site doesn’t work… I get this error:
Parse error: syntax error, unexpected ‘}’ in functions.php on line 54I tried removing the code to go back to what it was, and I still get the same error. The idea is great, but I think there just needs to be a tweak or something. Can you please help?
May 17, 2016 at 4:18 pm #633814Hi!
Do you mind posting temporary admin logins and FTP logins here privately?
Cheers!
YigitMay 17, 2016 at 4:33 pm #633827If it helps, this is everything inside my child functions.php file:
<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/
//set builder mode to debug
add_action(‘avia_builder_mode’, “builder_set_debug”);
function builder_set_debug()
{
return “debug”;
}add_action( ‘wp_enqueue_scripts’, ‘enqueue_font_awesome’ );
function enqueue_font_awesome() {wp_enqueue_style( ‘font-awesome’, ‘//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css’ );
}
/*
* The above code installs font awesome fonts
*/
/*
* The following code changes the name of the word “All” to “All Projects” for the Portfolio grid categories
*/
add_filter(‘avf_portfolio_sort_first_label’,’new_first_label’);
function new_first_label() {
$first_item_name = “All Projects”;
return $first_item_name;
}// pipe
add_action( ‘wp_footer’, ‘ava_custom_script’ );
function ava_custom_script() {
?>
<script type=”text/javascript”>
(function($){
function b() {
$(‘.sort_by_cat’).find(‘.text-sep’).empty().text(‘|’);
}b();
})(jQuery);
</script>
<?php
}May 17, 2016 at 4:54 pm #633841Ok, I got my site back… went into the Cpanel side of things and found that the code was using an ampersand symbol at the end like this: </script>
<?php
}
I put your code back in, but it doesn’t change anything on the slash to pipes ( “/” to “|” ). See the page link below. It’s the slashes between each portfolio category that I want to change. Thanks!May 19, 2016 at 3:51 am #634872Hi,
We checked the page but the script is not there. Please copy the code directly from this forum, not from your email. If it’s not working, post the login details here so that we can check it.
Best regards,
IsmaelMay 19, 2016 at 4:06 pm #635283Hi,
As mentioned, the code didn’t change anything on my end so I removed it. After doing more searching, I found a post whereby making the slash transparent would solve the problem of eliminating it (doesn’t give the pipe mark, however). This is the code I used to make it transparent, and it worked:
/*Change hover color of the portfolio categories*/
#js_sort_items .sort_by_cat a:hover{ color: blue !important;}
I put this code in my child css sheet. I’d still like the option of changing the / to a | . Is there css coding that can be done in the style sheet, instead of the functions.php sheet, or is this a functions only code?Thanks!
May 20, 2016 at 8:29 am #635768Hi,
Please try adding this code it is a slightly modified version of the earlier code and it works perfectly on my installation please see screenshot in private
add it to the bottom of the functions.php file.
// pipe add_action( 'wp_footer', 'ava_custom_script' ); function ava_custom_script() { ?> <script> (function($){ function b() { jQuery('.sort_by_cat').find('.text-sep').empty().text('|'); } b(); })(jQuery); </script> <?php }
Best regards,
VinayMay 21, 2016 at 2:42 pm #636202That works beautifully! Thanks so much Vinay!! :)
May 23, 2016 at 6:26 am #636554 -
AuthorPosts
- You must be logged in to reply to this topic.