Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #451049

    Hi. I have a Custom Post Type called News that I want to remove the sidebar on. The sidebar shows up on single post view. However, I want to keep the sidebar for my regular Posts. How might I go about this?

    Thanks!

    #451732

    Hi dburton77!

    Do this, https://kriesi.at/support/topic/overriding-functions-in-a-child-theme/#post-167093, to add the sidebar and layout options to your custom post type.

    Regards,
    Elliott

    #452103

    Hey, I implemented that and it works great to add the ALB to that post category. However, it breaks the Format > Link function that I still need. Some of the posts in that CPT I use the preview pic to simply link to an external site. Any way to make the Link Function on the preview pic work again?

    #452820

    Hey!

    Hmm, can you send us a link to your page and take a screenshot highlighting what is going on? I’m not sure I understand.

    Cheers!
    Elliott

    #452854

    Well perhaps it’s not an issue after all. The Format > Link option seems to be working fine today. Perhaps it was a caching issue.

    I would like to know how I might get the posts that are set to Link format to open in a new window?

    #453047

    Hi!

    We need to see the actual page with the “link” posts. Please post it here.

    Cheers!
    Ismael

    #453078
    This reply has been marked as private.
    #453711

    Hey!

    I can’t open your link:

    An example for a correct html link which gets opened in a new window would be:

    <a href="http://www.w3schools.com/" target="_blank">Visit W3Schools!</a>
    

    Cheers!
    Andy

    #456868
    This reply has been marked as private.
    #457154

    Hi!

    Did you use the Grid Layout? If yes, please edit config-templatebuilder >avia-shortcodes > postslider.php, look for this code around line 367:

    $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";
    

    Replace it with:

    $target =  strpos($entry->post_content, 'http') === 0 ? '_blank' : '';
    					$output .= $thumbnail ? "<a href='{$link}' target='{$target}' data-rel='slide-".avia_post_slider::$slide."' class='slide-image' title=''>{$thumbnail}</a>" : "";

    Make sure that you place the link at the very beginning of the post content. Use full or absolute url, sample:

    http://www.mypage.com/page
    

    If it works, please create a change log or note for this modification in case you update the theme.

    Cheers!
    Ismael

    #457578

    Works great! Is there someway I can store the revised post slider.php file to my child theme so this change doesn’t get overwritten with theme updates?

    #457903
    #458883

    Thanks so much!

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Remove Sidebar on a Custom Post Type’ is closed to new replies.