Support Forums for LiveMesh Themes & Plugins › Forums › Enigmatic Theme Support › Filterable Portfolio Shortcode?
Tagged: categories, portfolio, taxonamy
- This topic has 11 replies, 4 voices, and was last updated 11 years, 1 month ago by livemesh.
-
AuthorPosts
-
April 10, 2013 at 2:45 pm #546JohnGuest
I’d like display the show_post_snippets post_type=”portfolio” in a non-portfolio template because I want to display other content above and below it on the page.
There’s an existing shortcode to display portfolio:
[show_post_snippets post_type=”portfolio” number_of_columns=4 post_count=4 image_size=”small” show_meta=false layout_class=”post-snippets full-width-snippets” display_text=false]
However, I don’t see how I can make it filter. Is there a way I can specify that in the snippet? If not, what is a way that I can do that whereby I can still add content above AND below a portfolio?
April 11, 2013 at 11:18 am #548livemeshKeymasterGreat question. Just add two parameters to the above shortcode. The first one would be
taxonamy= 'portfolio_category'
and the second one that is liketerms='printing,graphics'
of comma separated values for actual category names you specified for portfolio items. Hope that helps.April 11, 2013 at 7:41 pm #552JohnGuestI like the way that worked BUT I’d really like it to work like it work as a sortable portfolio i.e. https://www.livemeshthemes.com/enigmatic/portfolio-3-columns-sortable-2/. Anyway to display the portfolio this way through the snippet?
April 13, 2013 at 12:13 pm #556livemeshKeymasterNot currently. That would require some code change. Will ‘Portfolio Home’ page work for you? You can have content on the top with the help of Custom Heading Content markup in the metabox provided below the page editor. You can insert any number of segments into this field. Then the portfolio items would show up and rest of the content (additional segments) can be input in the regular TinyMCE page editor of WordPress. Not very flexible but gets the job done.
Let me know if you this seems cumbersome and I can probably get a custom shortcode written to take care of this. I suspect it would require just a little bit of custom styling.
July 26, 2013 at 6:45 am #1229nawrockpMemberHi there
I am trying to do the same. I see that mo_display_home_portfolio_content(), with the proper arguments will get it done but I need it as a shortcode. What do you think would be the quickest way to do this? Create a new shortcode in my functions.php file?
thanks, and great theme!
KenJuly 30, 2013 at 10:33 am #1233livemeshKeymasterHi – sorry for the delay. If you have not done this yet already, pls create the shortcode in custom/custom-functions.php file. The following should work –
function mo_portfolio_shortcode() { $args = array( 'number_of_columns' => 3, 'image_size' => 'large-thumb', 'posts_per_page' => 9, 'filterable' => true ); $output = '
'; // Note: Will need to modify the called method to return HTML instead of echo-ing $output .= mo_display_home_portfolio_content($args); $output .= ''; return $output; } add_shortcode('portfolio', 'mo_portfolio_shortcode');August 11, 2013 at 10:52 pm #1304rladouceurMemberThis seems tantalizing close to the solution to the problem I’ve had 3 developers chasing for weeks.
Though not a coder …
I have added the above code (unmodified) to my functions.php file. However, when I use the shortcode supplied by John with the two parameters you suggested, the portfolio displays, but the terms do not appear above the items (as they do on the sortable portfolio pages), so consequently I am not able to actually sort them.
What am I doing wrong?
August 13, 2013 at 3:55 am #1310livemeshKeymasterI just released an update which has a shortcode named
[show_portfolio]
which hope meets your need. Pls have a look at the below page –https://www.livemeshthemes.com/enigmatic/portfolio-shortcodes/
The shortcode is –
[show_portfolio number_of_columns=3 post_count=12 image_size='medium']
I should mention though, that you cannot limit the categories here by providing taxonomy terms. I was not sure that is your requirement.
August 13, 2013 at 9:19 pm #1316rladouceurMemberI’ve just updated the theme. And indeed, the shortcode works.
Now …
There wouldn’t happen to be a parameter to display the portfolio item title, would there?
August 14, 2013 at 6:30 am #1317livemeshKeymasterNo option to display the title. On hover, the user is able to view the title, category. For displaying title, you can try adding the below method to custom/custom-functions.php –
function mo_get_portfolio_entry_text($thumbnail_exists, $excerpt_count) { $output = '
'; $output .= "\n" . the_title('', false); $display_text = mo_get_theme_option('mo_hide_text_in_portfolio') ? false : true; if ($display_text) { $output .= ''; return $output; }'; $output .= mo_truncate_string(get_the_excerpt(), $excerpt_count); $output .= ''; } $output .= 'and then calling the same in the method
mo_get_home_portfolio_content()
around line number 282 –$output .= mo_get_portfolio_entry_text(true, 100);
You will need to style the text a bit. Hope this helps.
August 15, 2013 at 1:07 pm #1321rladouceurMemberI’ve succeeded in creating a filterable shortcode driven sortable portfolio homepage. Thank you for the update … it was the key to my eventual success.
One last question. Where do I find and how can I change the label “Portfolio Filter” that precedes the sort buttons? I’d like mine to read “Initiative Filter.”
As always, you help is most appreciated.
August 15, 2013 at 2:53 pm #1322livemeshKeymasterGlad to hear that it helped. You can find the ‘Portfolio Filter’ string in the file
framework/functions/blog-content.php
file in the methodmo_get_portfolio_categories_filter()
around line number 588. Thanks -
AuthorPosts
- The forum ‘Enigmatic Theme Support’ is closed to new topics and replies.