Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #802454

    Hi, I have a portfolio grid and the setting is to use the ajax preview. But as I understand I should be able to overwrite the grid setting by setting a portfolio item to Define a Custom link and then that one item should not open in ajax preview, but go to the page. For some reason this does not work for me, it acts just the same and opens ajax preview. Am I missing something?

    thanks

    #802712

    Hey nfgraphicdesign,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #802725

    access is below in private

    #804134

    Hi,

    Please go to
    Settings -> Permalinks save them again and let us know if it works.

    Best regards,
    Basilis

    #804195

    Hi,

    This did not work, I have tried that already as well as again now.

    Nathan

    #805208

    Hi Nathan,

    Well, when I checked Western Paradise Scottsdale item, custom link is not defined there. So obviously, it just does the ajax portfolio routine. I got the portfolio item to open the link in a new page. The settings are on the screenshot in private.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #805278

    Hi Victoria,

    That is because the Western Paradise one I do want to open in ajax. Most I want to open in Ajax. Only 6 Need to open in a custom link new page and I have set it for those, but they still open in Ajax.
    Drew Duplex
    Columbia 4 Plex Kamloops
    Sunpeaks 4 Plex
    Abby Place
    Nicola 5-Plex Kamloops
    9th Avenue Triplex

    I do notice these 6 properties title is in black instead of purple like the rest which means there is no link but the thumbnail still opens the Ajax. Shouldn’t both the thumbnail and the title get the custom link I have set?

    Thanks,
    Nathan

    #806768

    Hi,

    Thank you for the update.

    The custom link option is not going to be applied when the AJAX Portfolio option is enabled. It’s possible but you have to modify the config-template-builder > avia-shortcodes > portfolio.php file. Look for this code around line 422:

    $custom_link = get_post_meta( $the_id ,'_portfolio_custom_link', true) != "" ? get_post_meta( $the_id ,'_portfolio_custom_link_url', true) : false;
    

    Below, add the following code.

    $custom_link_class = get_post_meta( $the_id ,'_portfolio_custom_link', true) != "" ? 'grid-custom-link' : '';
    

    Again, find this code around line 507:

    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size, $image_attrs )."</".$link_markup[1].">";
    

    And replace it with:

    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='".$custom_link_class." grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size, $image_attrs )."</".$link_markup[1].">";
    

    After that, edit the js > shortcodes.js file, look for the “avia_portfolio_preview” function. Look for line 1538-1539:

    load_item: function(e)
    				{
    

    Below add this line of codes:

    					var target = $(e.currentTarget);
    					if(target.is('.grid-custom-link')) return;
    

    Remove browser cache or hard refresh after adding the modifications.

    Best regards,
    Ismael

    #810004

    Thank you for the instructions, I am having some problems though as it has stopped the thumbnails from loading and the slider.

    For the shortcodes.js file, I have added the 2 lines of code as follows, please let me know if this is correct.

    	methods = 
    			{
    				load_item: function(e)
    				var target = $(e.currentTarget);
    									if(target.is('.grid-custom-link')) return;
    				{
    					e.preventDefault();
    
    					var link			= $(this),
    						post_container	= link.parents('.post-entry:eq(0)'),
    						post_id			= "ID_" + post_container.data('ajax-id'),
    						clickedIndex	= items.index(post_container);
    #810005

    for portfolio.php

    I have added the line here:

    $custom_link = get_post_meta( $the_id ,'_portfolio_custom_link', true) != "" ? get_post_meta( $the_id ,'_portfolio_custom_link_url', true) : false;
    				$custom_link_class = get_post_meta( $the_id ,'_portfolio_custom_link', true) != "" ? 'grid-custom-link' : '';

    Also replaced line:

    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size, $image_attrs )."</".$link_markup[1].">";

    with line:
    $output .= "<".$link_markup[0]." data-rel='grid-".avia_post_grid::$grid."' class='".$custom_link_class." grid-image avia-hover-fx'>".$custom_overlay.get_the_post_thumbnail( $the_id, $image_size, $image_attrs )."</".$link_markup[1].">";

    Have I missed something? Thanks again.

    #810211

    Hi,

    You have to add the modification after the opening curly brace.

    load_item: function(e) 
    {
    				var target = $(e.currentTarget);
    				if(target.is('.grid-custom-link')) return;
    

    Best regards,
    Ismael

    #812336

    Hi Ismael,

    I made that last change you gave and it did fix problem with the thumbnails and slider.

    However the thumbnail still opens the ajax loader and the title under the thumb is not a link. Am I missing something?

    I have reset the permalink and emptied my cache, but still need it to load the custom link.

    thanks,
    Nathan

    #812893

    Hi,

    Did you modify the portfolio.php file correctly? Please review the modification or post the FTP details here so that we can test it.

    Best regards,
    Ismael

    #814098

    Hi,

    I believe I did modify both files correctly, if you could take a look, the FTP info is in private message portion.

    Thank you.

    Nathan

    #814099

    the WordPress admin login I gave earlier is still valid if you need that as well.

    Thanks,
    Nathan

    #814800

    Hi,

    Are you sure that this is the correct FTP details? I remove everything from the portfolio.php file and it didn’t affect the site.

    // http://www.nfgraphicdesign.ca/2tone-test/

    Best regards,
    Ismael

    #815156

    Hi,

    yes this is the correct FTP, if you go to wp-content and rename the plugins or the themes folders the site doesn’t load I just tested that.

    so why would changes in portfolio.php not do anything?

    #815269

    Hi,

    I didn’t notice that you duplicated the “portfolio” shortcode. I deleted the “ORIG_portfolio.php” file and modified the original portfolio.php file a bit. Please remove browser cache or hard refresh before checking the page.

    Note for moderators:

     if(!empty($title_link))
                            {
                            	$output .= "<a href='{$title_link}' title='".esc_attr(strip_tags($title))."'>".$title."</a>";
                            }
                            else
                            {
                            	$output .= "".$title."";
                            }
    
    

    .. replaced with:

      if(!empty($title_link))
                            {
                            	$output .= "<a href='{$title_link}' title='".esc_attr(strip_tags($title))."'>".$title."</a>";
                            }
                            else
                            {
                            	$output .= "<a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a>";
                            }
    
    

    Best regards,
    Ismael

    #816212

    that is working great on the thumbnails but I also need the titles to open the custom link and not do the ajax loader then it will be perfect.

    #816601

    Hi,

    Thank you for the update. Please edit link 522.

    $output .= "<a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a>";
    

    Replace it with:

    $output .= "<a class='{$custom_link_class}' href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a>";
    

    Best regards,
    Ismael

    #816902

    Great, thanks a lot for all of your help.

    So for any future Enfold updates, I have to apply these changes again? Shouldn’t this be how the theme should work when you enter a custom URL?

    I am just not sure what change you made to get it working, if you could let me know so I can make sure it doesn’t get broken on any new updates.

    Thank you!

    #818515

    Hi,

    There’s a way to override the shortcode in a child theme but we don’t recommend it because changes in the parent file, if there’s any, will not be applied.

    // http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    Best regards,
    Ismael

Viewing 22 posts - 1 through 22 (of 22 total)
  • You must be logged in to reply to this topic.