• 0
Sign in to follow this  
Followers 0

DMS 2 Customizing the Metabar in Custom Posts


Question

Posted · Report post

I am trying to post research paper abstracts for a client and have created a custom post type for doing so using Custom Post Type UI plugin. But I do not know how to customize the pagelines metabar in these posts to remove the date and comment link.  Ideally, I would replace these with some of the custom metadata (paper-author, paper-topic), but if that is not easy to do with custom css, I can just remove the metabar all together and put the info into the post content.

 

This is the code I want to change as identified by firebug.

<div class="metabar">

Posted
<time class="date time published updated sc" datetime="2014-04-18T07:30:14+00:00">April 18, 2014</time>
ยท
</div>
 
Thanks in advance for any help!

Share this post


Link to post
Share on other sites

12 answers to this question

  • 0

Posted · Report post

So you want to show the taxonomy, similar to the way the posts show the category they're in ? If so, then that isn't currently supported via the Metabar. What you could do is create your own shortcode and add to that field, that may work or use a hook. You can find out more about hooks here - http://docs.pagelines.com/advanced/hooks

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

 

To customize a Post Types meta panel, you will want to enable Legacy options and then use the Meta Options to customize the panel, these are simple shortcodes and allow you to add/remove whatever you like.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks, Danny.  Can you tell me where I can enable legacy options.  I can't seem to find that.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Actually there isn't a need to use the Legacy options (my mistake), you can simply click on the WP-Content/PostLoop section and use the options there - http://screencast.com/t/AwTVVe0a

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Ok, I see that, and it works.  But the shortcodes are only for attributes of the post.  I don't see any shortcodes for the taxonomies in my custom post type (authors, journal, topic).  Is there an easy way to use these shortcodes with the slugs that these taxonomies create? If not, is there a shortcode to eliminate the metabar?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What do you mean exactly shortcodes for taxonomies, can you be a bit more specific please.

 

Also, if you want to completely hide the MetaBar you can add the following snippet into the MetaBar field

 

&nbsp;

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am using The Custom Post Type UI plugin and in this, I am able to create a custom post type (papers) and for each research paper, I have defined taxonomies (authors-for the people who wrote the paper, journal-for the periodical it was published in, and topic-for the topic the paper covers). I would love to roll some of this custom post type meta data into my posts, but it is not clear to me how to do that.  Do you have a quick fix?  If not, I will jhide the metabar as you described and add in the information into the post. 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks, Danny

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

No problem. I will also make a note to add taxonomy support via metabar to our feature request tracker.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

sethoof"] and @[member="Danny - I found a way to do this! I used the plugin Shortcode Exec PHP to create some shortcodes for my custom taxonomies.  I searched the internet like crazy for some PHP that would do the same effect as the [post_categories] and [post_tags] shortcodes and here's the code I found that works.

 

Just insert this code in the code box minus any <?php and ?> tags and change 'your_custom_taxonomy' to the name of your taxonomy, put in a unique shortcode name in the shortcode box, and save.

echo get_the_term_list( $wp_query->post->ID, 'your_custom_taxonomy', '', ', ', '' );
1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for sharing.

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
Sign in to follow this  
Followers 0