Jump to content


Photo
Resolved

Custom taxonomies not showing - are they supported in Pagelines?

taxonomy customisation functions.php

  • Please log in to reply
9 replies to this topic

#1 Oxford_Guy

Oxford_Guy

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationOxford, United Kingdom

Posted 16 September 2012 - 05:20 PM

Hi - custom taxonomies are important to me, but I can't seem to get them to work in PageLines Lite. I've installed and activated the Pagelines Customize plugin and have added this code to the functions.php file in the pagelines-customize folder:

 
/**
* Custom taxonomy for recipe ingredients
* Following guidelines in Dig into Wordpress 3.3 p.35
* Also references code from: http://codex.wordpress.org/Taxonomies
*
*/
function ingredients_init() {
// create a new taxonomy
register_taxonomy(
'ingredients',
'post',
array(
'hierarchical' => false,
'label' => __( 'Ingredients'),
'query_var' => true,
'rewrite' => array( 'slug' => 'ingredient'),
)
);
}
add_action( 'init', 'ingredients_init' );

Normally when I use this code, when I open up the "Posts" menu item in the WP admin side bar I will get an additional menu item for each taxonomy I create under "Tags", so when using the above example I should get a menu item for "Ingredients" where are can add new terms, assign them to posts etc. Also any posts tagged with a term from one of these taxonomies (e.g. "eggs") should be listed when I use a url of the form: http://myblog/ingredient/eggs but I'm getting a 404 error instead.

Are custom taxonomies not supported in Pagelines or do I need to set these up in a different way? If custom taxonomies are not supported, I'm not sure that Pagelines is going to work for me :-(

#2 Oxford_Guy

Oxford_Guy

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationOxford, United Kingdom

Posted 16 September 2012 - 05:32 PM

I think I may have found some clue as the why the above code isn't working, when I go the Edit page for page lines-customize/functions.php I can see my custom code there, but at the top of the Edit page its says:

Editing pagelines-customize/functions.php (inactive)

This is despite the Pagelines Customize plugin itself being active. In fact this is the current status for all the files in the pagelines-customize folder:

pagelines-customize/pagelines-customize.php (active)

pagelines-customize/functions.php (inactive)

pagelines-customize/style.css (inactive)


How do I make pagelines-customize/functions.php and pagelines-customize/style.css active? Is Pagelines Customize fully supported by PageLines Lite or is this where the problem lies?

#3 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 16 September 2012 - 08:12 PM

Editing pagelines-customize/functions.php (inactive)
Is a WordPress default that has no bearing whatsoever on the activity of your work on the page. It also has nothing to do with whether your changes work.

What is impacting your use of custom taxonomies is the fact that you're using PageLines Lite rather than full Framework. Lite implies it has limited functionality and to do custom things, you should upgrade.

#4 Oxford_Guy

Oxford_Guy

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationOxford, United Kingdom

Posted 16 September 2012 - 08:32 PM

Editing pagelines-customize/functions.php (inactive)
Is a WordPress default that has no bearing whatsoever on the activity of your work on the page. It also has nothing to do with whether your changes work.

What is impacting your use of custom taxonomies is the fact that you're using PageLines Lite rather than full Framework. Lite implies it has limited functionality and to do custom things, you should upgrade.


Okay, to make sure I've understood correctly:

1) The PageLines Custom plugin is not compatible with PageLines Lite

2) Implementing custom taxonomies using code such as the example I gave should be fine using the full PageLines framework?

I just wanted to confirm this, as don't won't to upgrade to the full framework unless its possible to use custom taxonomies, but this isn't something I can test beforehand

#5 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 16 September 2012 - 08:48 PM

1) No, the PageLines Customize plugin is compatible, but not every function added to it will be compatible with Lite. Some will be; some won't.

2) Custom taxonomies are usually added via a plugin as this is a complex process involving WordPress core, not so much PageLines. You should consider using "Custom Press" a plugin I use successfully in my site. Works perfectly with Framework.

#6 Oxford_Guy

Oxford_Guy

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationOxford, United Kingdom

Posted 16 September 2012 - 09:16 PM

1) No, the PageLines Customize plugin is compatible, but not every function added to it will be compatible with Lite. Some will be; some won't.


Oh okay, I see. So I could still potentially add some custom PHP functions and CSS to Pagelines Lite?

2) Custom taxonomies are usually added via a plugin as this is a complex process involving WordPress core, not so much PageLines. You should consider using "Custom Press" a plugin I use successfully in my site. Works perfectly with Framework.


Okay, thanks for the tip

#7 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 16 September 2012 - 09:37 PM

You can, but I don't know and can't guaranty that they will work with Lite. It has very specific limitations with some functions which is why you should really get the Framework.

#8 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 16 September 2012 - 09:39 PM

Actually. custom tax will still work, we are not allowed to remove core wp functionality otherwise the theme would not be allowed in the wp.org repo!

The problem here is this:
Your adding an init action into the customize plugin, but the customize plugin functions.php is called during template_redirect, and that happens on front end WAY after init ;)

SO you need to create a simple child theme ( docs are on the wp codex ) and in the child theme functions.php add your code ;)

#9 Oxford_Guy

Oxford_Guy

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationOxford, United Kingdom

Posted 17 September 2012 - 05:57 PM

Hi - thanks to everyone for your help with this, its good to know that even for Pagelines Lite some support is offered, which I take as a good sign for the level of support offered for the paid product...

Anyway, I've been able to implement custom taxonomies in Pagelines Line using the "Custom Press" plugin that Rob mentioned (thanks for the tip), so now I at least know its possible to implement these in Pagelines a reasonably straightforward manner (so this issue can probably be considered closed)

The wider issues with the customize plugin functions.php are a little over my head, it sounds like only certain code works here, but using a functions.php file in a child theme may be a way to get around this.

#10 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 17 September 2012 - 05:59 PM

The topic was marked as resolved.





Also tagged with one or more of these keywords: Resolved, taxonomy, customisation, functions.php