Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #198814

    Hi,

    I have a blog using mainly links and would need 2 modifications

    - On the blog page, when the custom post is a link, the title of the post opens the link directly. Is there a way to have the small preview image to open the link as well instead of opening the post (which is empty). Or could I disable the link on the image ? Thanks

    - I am also using the Enfold widget latest post and would need the title and img to open the link instead of the post.

    Thank you very much for your help!

    Olivia

    #198889

    Hi oliviad!

    1.) You can remove the link on the small icon. Edit js > avia.js, find this code:

    $.avia_utilities = $.avia_utilities || {};

    Below, add this code:

    $("a.small-preview").removeAttr("href");

    Remove browser cache then reload the page a few times.

    2.) Can you please give us a link to the page with the actual widget?

    Cheers!
    Ismael

    #199783

    Thanks I’ll try that.

    Here is a link http://goo.gl/pBVB73 then click on About page and see Latest post widget on the right handside sidebar.

    I would need the title to go strait to the link.
    Thanks

    #200186

    Hey!

    Open up /wp-content/themes/enfold/framework/php/class-framework-widgets.php and replace

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

    with

    
    $url = get_permalink();
    $format = get_post_format();
    
                                              if($format == 'link')
                                               {
                                                    $current_post = array();
                                                    $current_post['content'] = get_the_content();
                                                    $current_post['title'] =  get_the_title();
                                                    
                                                    if(function_exists('avia_link_content_filter'))
                                                    {
                                                        $current_post = avia_link_content_filter($current_post);
                                                    }
                            
                                                    $url= $current_post['url'];
                                                }
    
    echo "<a class='news-link' title='".get_the_title()."' href='".$url."'>";
    

    Regards,
    Peter

    #205222

    Hi, thanks for your help but it does link to the post and not the link :( Any idea how to link the widget to the link directly ? Thanks very much for your great support and happy new year !

    #205238

    Hi,

    oops sorry, ignore my previous message as it is working perfectly well.

    A big THANK YOU !!

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

The topic ‘Post widget / link’ is closed to new replies.