Tagged: ajax portfolio
-
AuthorPosts
-
September 30, 2014 at 12:08 pm #327118
Hi,
I am using the Portfolio Grid, single layout to show a list of publications articles and use the Ajax format to expand the tittle and show the abstract. However as default the Ajax open always on the top. How can be open directly below/ at the current location of the box? I have some past threads where Josue suggested to delate some code in shortcodes.js (see link below) however I can’t find anymore the line/code he is referring to. Any help?
https://kriesi.at/support/topic/ajax-portfolio-show-at-current-location/
Thank you very much.
September 30, 2014 at 10:09 pm #327631Hey MeryVi!
Those lines should be located around line 1500 and 1525 in js/shortcodes.js, if you paste a link to your install i can give you the exact line numbers.
Regards,
JosueOctober 2, 2014 at 9:58 am #328793Hi Josue thank you for the help! Here the install
October 2, 2014 at 5:36 pm #329115Hi!
Ok, try commenting/removing line 1297 and 1319.
Cheers!
JosueOctober 3, 2014 at 3:43 pm #329747Hi Josue,
line 1297 is already blank is that normal?
While for line 1319 should I remove this: activate_shortcode_scripts(content_retrieved[post_id]);Thanks!
October 3, 2014 at 4:54 pm #329787Hey I have updated the theme to Enfold 3.0
this is the new install. What line should I remove now?- This reply was modified 10 years, 2 months ago by Josue. Reason: please don't paste the whole code here, use gist.github.com or pastebin.com
October 3, 2014 at 7:17 pm #329857October 4, 2014 at 5:36 pm #330246Hey Josue
Thank you for that I commented those line but the Ajax preview still opens at the top of the page. The only thing that changed by removing those lines is that the page does not scroll automatically on top. Is there any way to show the Ajax preview at the same location of te quadrant?
Alternatively I am trying to use the Ajax mode to show list of publications so that when one click on the tittle the abstract opens. Do you know any good plugin to have something similar? The only one I know is teachPress but the design is not that good.
Thanks for the help!
October 4, 2014 at 6:34 pm #330254Hey!
Did you add this code to Quick CSS?
.portfolio_preview_container{ position: absolute; z-index: 200; background: white; box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 25px 1px; }
Can you post a link to your portfolio page?
Cheers!
JosueOctober 4, 2014 at 7:20 pm #330264This reply has been marked as private.October 4, 2014 at 8:21 pm #330280Hey!
Now add this to functions.php:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery(".grid-entry-title a").on('click', function(){ var offsetTop = jQuery(this).offset().top - 150; jQuery(".portfolio_preview_container").css('top', offsetTop); }); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Also add some white space below the portfolio element so the last element ajax content can expand.
Cheers!
JosueOctober 6, 2014 at 5:46 pm #331017Hi Josue thank you very much for that it worked perfectly!
I have a very last question it could be possible instead to showing directly the excerpt in the portfolio grid preview, have a function that allow the users to click on the word “Excerpt” and the excerpt expand below?
Or alternatively a general html code that allows to expand the text when one click on it. E.g. just showing “Abstract” and when one click on it the text expand below. I kind of Accordion but without the frame.
Thank you very much for the help.
October 6, 2014 at 6:22 pm #331050Hi Josue sorry for all the buzz.
I actually found a plugging that does exactly the job
http://www.dagondesign.com/articles/expanding-text-plugin-for-wordpress/However it can only be add using the html/code which is currently not supported in the excerpt section of the portfolio items.
Is there anyway to enable html code in the excerpt?Thank you very much for the support!
October 6, 2014 at 6:55 pm #331091Hey!
I’d suggest using a WP plugin instead, like WP ShowHide.
How to enable shortcode rendering in portfolio excerpt:
https://kriesi.at/support/topic/using-enfold-shortcodes-in-the-excerpt/#post-196611Regards,
JosueOctober 6, 2014 at 7:29 pm #331102That worked amazingly !! thank you very much for the help!
October 6, 2014 at 7:35 pm #331110Oh now I have another issue though ! When I expand the text in the excerpt, the text hide behind the below portfolio entry! Is there a way to make it scroll down when one expand the text without by default expand the space between the items as when the text is hidden a big gap it won’t look nice.
October 6, 2014 at 8:07 pm #331132Your portfolio page isn’t loading right now, you have a fatal error in the config-templatebuilder/avia-shortcodes/portfolio.php file.
Regards,
JosueOctober 6, 2014 at 8:39 pm #331157Now should work!
October 6, 2014 at 10:03 pm #331190Hi,
Try adding this at the very end of your theme functions.php file:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery(".sh-link").on('click', function(){ jQuery(window).trigger('resize'); }); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
JosueOctober 6, 2014 at 10:14 pm #331195Hi Josue unfortunately the above code gives me a fatal error.
October 6, 2014 at 11:01 pm #331209October 6, 2014 at 11:11 pm #331213That worked amazingly thank you so much for all your support Josue, it has been really impeccable!
October 7, 2014 at 12:33 am #331235You are welcome, glad to help :)
Regards,
JosueOctober 7, 2014 at 1:11 am #331244I am so sorry Josue but I just realised that another issue arose now :( Apparently from the list of publications only the first abstract seems to expand!
October 7, 2014 at 2:10 am #331268Hi!
Maybe you are misusing the WP HideShow shortcodes, or there is a plugin limitation when it’s used in this environment, if you look at the markup all links are pointing to the same expandable content. I’d suggest contacting the plugin author:
https://wordpress.org/support/plugin/wp-showhideAlternatively, you could try using the Enfold built-in toggles:
http://kriesi.at/themes/enfold/shortcodes/toggles-accordions/Cheers!
Josue- This reply was modified 10 years, 2 months ago by Josue.
May 28, 2016 at 9:34 pm #639847hi,
also want to display portfolio ajax preview content below instead of top
I did not understand exactly which code to change and where in shortcodes.jsthanks
davidMay 28, 2016 at 10:56 pm #639872Hi,
Did you try this code?
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery(".grid-entry-title a").on('click', function(){ var offsetTop = jQuery(this).offset().top - 150; jQuery(".portfolio_preview_container").css('top', offsetTop); }); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Best regards,
JosueMay 29, 2016 at 7:51 am #639903Thanks
I tried but it did not workMay 29, 2016 at 9:44 am #639924Hi,
Please post a link to your portfolio.
Best regards,
JosueMay 29, 2016 at 9:56 am #639926hi,
Here are the details
Have to login to view the site
Portfolio is in home page in the middle -
AuthorPosts
- You must be logged in to reply to this topic.