• 0

Plugin Types incompatibility with Framework


Question

Posted · Report post

Hi,

I am expiriencing problems when using the types plugin

(http://wp-types.com)
Issue:
When creating a CPT (in my case called videos) and then using the wordpress search, depending on your search term the Wordpress page template varies: You either get the search template or the single CPT template.

If the results contain CPTs it will return the Video Page Template. This should not be. I want the search results to always return on the Search template.

I already started a thread with the plugin creator here:
http://wp-types.com/forums/topic/types-changing-my-search-result-page-template/

 

Here are two different queries which return different templates:
http://insidefinance.yourbusinesschannel.com/?s=tax
http://insidefinance.yourbusinesschannel.com/?s=term

 

WP version: 3.5.2
PL Version: 2.43
Types version: 1.3.1

Could really use some help on this one ;)

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Posted · Report post

never mind. I fixed that issue by hacking the core files. About talking to AP, well, it's not talking if he doesn't reply. I asked in the PL group on skype aswell. Also.. pagelines itsself is using CPTs so this might even be an internal bug, except that the PL CPTs are not queriable so luckily the core is not broken. But then again, nick, who made the pockets premium section, should be quite annoyed to find out that his plugin is not properly queriable cause it throws you on the wrong template. So while I understand this might not seem like a bug for the "out of the box" site PL provides, but it limits extendability for devs, so I look at it as a bug.

If anyone has the same issue, he can fix this by editing the pagelines/includes/class.template.php file.

!!!THIS IS NOT RECOMMENDED!!! and should only be done if you know what you are doing:
On line 106, 107 move the

        elseif( pl_is_cpt() )
            $type = get_post_type();

down by 4 rows under

        elseif(is_search() && VPRO)
            $type = 'search';
This will check first if you are on a search page, and only if not check if it is a custom post type.
This fix will most probably not stick if you update your core theme files, but this is the best I could come up with.

Again: THIS IS NOT RECOMMENDED
(and will hopefully be fixed in a future update)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

I'm not even sure how to answer you on this one. It seems this is more a case of what your plugin does with the WP query, and what that query returns.  It sounds like you need some customization of WordPress. 

 

I don't think (and I could be wrong) that PL Framework would deliver a template unless it is called.  So, based on that call, whatever it is, any theme, platform or framework would deliver the related template.  No?  I would imagine too, that you'd need some kind of specific filter to leave out the video template, and deliver only the search template. That's going to take a professional developer with experience more in your plugin, than with our product.

 

I'm sorry to be less than perfectly helpful here, but coding isn't my expertise.  You may have noticed our Pros section is currently closed, so I can't even refer you to anyone.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Just found out, this is not a Types problem.

I added the post type with the following code:

    function post_type_setup(){
            $args = array(
                    'label'             => __('Videos', 'pagelines'),  
                    'singular_label'     => __('Video', 'pagelines'),
                    'description'         => __( 'Here are all videos', 'pagelines'),
                    'menu_icon'            => $this->icon,
                    'public'             => true,
                   'show_ui'             => true,
            //       'capability_type'    => ,
                   'hierarchical'         => false,
                   'rewrite'             => true,
                   'supports'             => array( 'title', 'editor', 'author', 'thumbnail'),
                   'taxonomies'        => array('vid_cat', 'vid_tag'),
             //      'menu_position'        => ,
                   'has_archive'        =>  true,
             //      'map_meta_cap'        => ,
             //      'query_var'            => ,                    
                );
            $taxonomies = array(
                $this->vidcat => array(    
                        'hierarchical'         => true,
                        'label' => __('Video Categories', 'pagelines'),
                        'singular_label' => __('Video Category', 'pagelines'),
                    ),
                $this->vidtag => array(    
                        'hierarchical'         => false,
                        'label' => __('Video Tags', 'pagelines'),
                        'singular_label' => __('Video Tag', 'pagelines'),
                    )
            );
            $columns = array(
                'cb'             => "<input type=\"checkbox\" />",
                'title'         => 'Title',
                'bdescription'     => 'Text',
                'bmedia'         => 'Media',
                $this->taxID     => 'Video Categories'
            );
        
            $this->post_type = new PageLinesPostType( $this->ptID, $args, $taxonomies, $columns, array(&$this, 'column_display'));
        
    }
and removed types.. the issue still persists. If the result of the search is videos, then it shows the video template.

Praying to the PL Gods, AP, Simon, Nick, please help me out!!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

First, I understand you're directing personal communications with AP, Simon and Nick. Do not do that.  It's inappropriate and isn't going to be helpful. This forum is where support is provided, when and where available. None of our team provide personalized support services.

 

If you've added that custom post type unfortunately we will not be able to support it.  You will need a developer. Clearly it's calling on pagelines to deliver something but it's not been specified to deliver what you expect.  I'd not know how you'd do that without a pro developer.  PageLines is not able to customize your post types unfortunately. 

 

This is a third-party code customization, which is solely the responsibility of the site admin or owner.  I'm sorry we can't be more helpful. 

 

However, you may wish to try a new site called www.pageliners.com which is offering some access to developers.  I don't know who, how or any other details and they are not part of the PageLines family of sites.

 

Very sorry that we can't help with this.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for pointing out that it's not recommended. 

 

It's also not supported. If you have problems with this, we will not provide support to your issue until you remove the coding provided by gyoery

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now