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

    I have a masonry grid showing posts from multiple post types. At least 1, maybe 2, of the custom post types need to directly open the defined custom link in a new page. I have added the necessary code to the meta.php file to recognise the CPT’s and added the following code to the functions.php so that the additional portfolio settings are visible in the CPT builder page:

    add_theme_support('add_avia_builder_post_type_option');
    	add_theme_support('avia_template_builder_custom_post_type_grid');
    	add_filter('avf_builder_boxes','yanco_enable_cpt_layout_builder');
    	function yanco_enable_cpt_layout_builder( $boxes ) {
    		$boxex = array();
    		$boxes[] = array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('post','portfolio','page','product', 'enfold_repeatable', 'pdf', 'instagram'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true );
    	    $boxes[] = array( 'title' =>__( 'Layout','avia_framework' ), 'id'=>'layout', 'page'=>array('post','portfolio','page','product', 'enfold_repeatable', 'pdf' ,'instagram' ), 'context'=>'side', 'priority'=>'low');
    	    $boxes[] = array( 'title' =>__('Additional Portfolio Settings','avia_framework' ), 'id'=>'preview', 'page'=>array('portfolio','post','pdf','instagram'), 'context'=>'normal', 'priority'=>'high' );
    	    $boxes[] = array( 'title' =>__('Breadcrumb Hierarchy','avia_framework' ), 'id'=>'hierarchy', 'page'=>array('portfolio','project_archive', 'pdf', 'instagram'), 'context'=>'side', 'priority'=>'low');
    		return $boxes;
    	}

    However, when i define a custom link on a CPT post, it does not link to the url, but instead links to the blank post page. Please could someone let me know what i have missed?

    Thanks,

    #1036581

    Hey Birdster,

    Can you give us temporary admin access? so we can try to take a look at your backend.
    Also give us a link to the page where you have applied this masonry grid?
    You can post the credentials and link in private content, so it’s only visible to the moderators.

    Best regards,
    Nikko

    #1036950

    Nikko,
    I’ve added the login details and url to the masonry grid page.

    Please note, the masonry grid loads posts in a random order, so you may have to scroll down to find the problem post. I have currently added two portrait images, they are the same content, with the same defined custom link. The one that is a portfolio post type links directly to the correct url, however the one that is a pdf post type does not.

    I am aware that the easy solution would be remove the custom post type and add all the pdf’s to the portfolio post type, but before i admit defeat – I would really appreciate it if you could explain what i have missed?

    Many Thanks,

    #1038024

    Hi Birdster,

    I apologize for the late response.
    To be honest I also find it hard to make it work.
    You would most likely need to make adjustment on Masonry element to make it work.
    Maybe you can take a look at it and maybe try to override it in the child theme.

    Best regards,
    Nikko

    #1038026

    Thanks for looking into it Nikko, I guess I will just keep all the pdf links in the portfolio item post type for now.

    #1038064

    Hi Birdster,

    Thanks for understanding.
    I think you’ll just have to create a category for it in portfolio and it should work well.

    Best regards,
    Nikko

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