Jump to content
gyoery

Plugin Types incompatibility with Framework

Recommended Posts

gyoery    2
gyoery

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
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gyoery    2
gyoery

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
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gyoery    2
gyoery

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
Rob    547
Rob

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


Former PageLines Moderator, Food Expert and Raconteur

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


  • Similar Content

    • medtime
      By medtime+
      Hello,
      We are using ProPricing but We cant change the colors from the Table. 
      How can we change it? It is all grey and we would like to add colors according our identity.
      Best,
       

    • ppotent
      By ppotent
      Any chance of a pagelines table plug-in coming? I know that the use of short codes and bootstrap can achieve this, but I can't seem to find any easy/visual editor way of doing this. There are table plug-ins around for wordpress, but honestly, they are pretty clunky. I'd pay for a tables plug-in, given how much I would use tables if I could.
       
       
    • Jeffrey Salim
      By Jeffrey Salim+
      When trying to activate the Facebook Plugin, using the Bootstrap Theme under Platform 5, the following Fatal Error occurs:
      Parse error: syntax error, unexpected '[', expecting ')' in /wp-content/plugins/pl-plugin-login-facebook/libs/fblogin.php on line 35
      If anyone has any advice, it would be greatly appreciated...
    • Queue-it
      By Queue-it+
      Hi,
      We're using Yoast SEO plugin and it can not crawl the content that is in a Pagelines text container, only the Paglines framework content. 
      I can see that it is a problem with SEO plugins and external site builders to read the content. So is there a Pagelines SEO plugin that would solve that? 
      I know that it does not effect stats on google, but it is not possible to see the full picture of SEO status. 

    • Thijs
      By Thijs+
      Hi,
      I am using the plugin WP-Property with an addon called "WP Property Supermap".
      Testwise I've added the shordcode [supermap] to
      the post loop a embed section a text section The supermap is located as third after the H1 and H2 tags but the map gets displayed at the top of the page, 
      All three ways break up the page structure of all content which is above the supermap.
      My question is: Where is the error?  Is it the plugin or the theme which causes the display errors?
×