Jump to content

Archived

This topic is now archived and is closed to further replies.

sethoof

Customizing the Metabar in Custom Posts

Recommended Posts

sethoof    3
sethoof

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
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
sethoof    3
sethoof

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
Danny    1,327
Danny

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


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
sethoof    3
sethoof

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
Danny    1,327
Danny

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;


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
sethoof    3
sethoof

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
Danny    1,327
Danny

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


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

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


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
evscicats    14
evscicats

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', '', ', ', '' );
  • Like 1

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Thanks for sharing.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • MissT
      By MissT+
      Hi there, the Filter By option within the Masonic section isn't working when a custom post type and custom category is selected.  If you swap to normal posts and categories then it works but sadly not with custom post types and custom categories.
      All posts are shown but when you click on the categories all posts disappear even though posts do have these categories. When you click All all the posts come back. I've tried this on two different websites with the same result.
      Many thanks in advance.
    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
×