Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #19754

    Hello,

    In Propulsion I am using the “Latest Portfolio Widget”.

    The Featured Image of the Portfolio Items are linked to a page.

    How can I get the thumbnails, shown by the widget, link to the related page

    instead of the portfolio item?

    Thanx!

    Ben

    #104872

    Hi,

    I’m not sure if this can be easily done because the Propulsion Latest Portfolio widget is just an extension of the Avia Newsbox (Propulsion Latest News). If you are asking where can you edit the code, you can find it on framework > php > class-framework-widgets.php, search for AVIA NEWSBOX.

    Let me tag the rest of the support team, see if they have any idea.

    Regards,

    Ismael

    #104873

    Great! Thanx!

    I just noticed that the “read more” link under the portfolio page also links to the portfolio item and not

    the page I made the image link to…

    Look forwward to your reply…

    Ben

    #104874

    Open up wp-contentthemespropulsionframeworkphpclass-framework-widgets.php and replace:

    echo "<a class='news-link' title='".get_the_title()."' href='".get_permalink()."'>";

    with:

    $linktarget = '';
    $slides = avia_post_meta(get_the_ID(), 'slideshow');

    if(!empty($slides[0])){
    $linktarget = avia_get_link($slides[0], 'slideshow_', '', get_the_ID());
    }

    if(empty($linktarget)){
    $linktarget = get_permalink();
    }

    echo "<a class='news-link' title='".get_the_title()."' href='".$linktarget."'>";

    and:

    echo "<a class='news-link-inner' title='".get_the_title()."' href='".get_permalink()."'>";

    with:

    echo "<a class='news-link-inner' title='".get_the_title()."' href='".$linktarget."'>";

    #104875

    Hi Dude,

    That worked just fine thank you!

    There is one more thing in regards to solving this problem:

    The “read more” link under the thumbnail on the portfolio page also links to the portfolio item. …

    I would like to link it to the relevant page as well!

    Thank you…

    #104876

    My last request is also for the name of the portfolio item under the thumbnail… This now links to the portfolio item as well..

    Thank you so much for your help!

    Ben

    #104878

    Hi,

    We will be reusing Dood’s code, with just the final line being changed to reflect the requirements, and I will put it in a single function later on to keep the code DRY … but for now please use what’s below, and peek back here for the function ..

    In file loop-portfolio.php, located in the includes folder, look for line 114 which looks like :

    echo "<a href='".get_permalink()."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".get_the_title()."'>".get_the_title()."</a>";

    and replace it with

    $slides = avia_post_meta(get_the_ID(), 'slideshow');

    if(!empty($slides[0])){
    $linktarget = avia_get_link($slides[0], 'slideshow_', '', get_the_ID());
    }

    if(empty($linktarget)){
    $linktarget = get_permalink();
    }

    echo "<a href='".$linktarget."' rel='bookmark' title='".__('Permanent Link:','avia_framework')." ".get_the_title()."'>".get_the_title()."</a>";

    and also on line 128 below (before the block pasted above would move it up)

    echo '<a class="more-link" href="'. get_permalink().'">'.__('Read more  →','avia_framework').'</a>';

    replace the above line with the line below

    echo '<a class="more-link" href="'.$linktarget.'">'.__('Read more  →','avia_framework').'</a>';

    Thanks,

    Nick

    #104879

    That did the trick! Thank you guys!

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Latest Portfolio Widget’ is closed to new replies.