Jump to content
Audun MB

Customising metabar info

Recommended Posts

Audun MB

How do I customise how the metabar information is shown?

For instance:

- The list of categories is separated by commas? Can I change that?

- Can I make it show only one category? (my previous theme did this, with lower ID number getting priority)

- Can I use CSS to style different parts of the information. This:


<strong>[post_categories]</strong> <em> [post_date]</em>

doesn't work, but I'd like something like that.

Share this post


Link to post
Share on other sites
catrina

  1. Categories are separated by commas in WP by default. In WP, the format is changed in the category list template tag itself, which is discussed here: http://codex.wordpress.org/Separating_Categories.'>http://codex.wordpress.org/Separating_Categories. The location of your category template tag should be in the post loop file, so you'd need to use the base theme to make the adjustment in that file.
  2. I think you can show only one category by using code to exclude certain other ones. You'll need to see the WordPress Codex: http://codex.wordpress.org/
  3. You'll need to use Firebug or Chrome Development to inspect the elements in your metabar and see what customizations can be made then Custom Code > Custom CSS in Site Options to make those customizations (http://www.pagelines.com/wiki/Custom_CSS).
  • Like 1

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Audun MB

  1. Categories are separated by commas in WP by default. In WP, the format is changed in the category list template tag itself, which is discussed here: http://codex.wordpre...ing_Categories. The location of your category template tag should be in the post loop file, so you'd need to use the base theme to make the adjustment in that file.

Thanks, but what/where is the post loop file? Can I add code to functions.php in my base theme, or do I need to add a separate file with the same name as the post loop file?

Share this post


Link to post
Share on other sites
Audun MB

regarding 3. it seems like the categories class governs how the [post_categories] metainformation is shown, but I can only get the comma separator to change color with CSS:


.categories {color:#f77c0a;}

I tried adding an "a.", but it doesn't help. Any idea on why it doesn't work?

Share this post


Link to post
Share on other sites
Audun MB

solved 3. with Chrome Inspector

Share this post


Link to post
Share on other sites
Danny

The topic was marked as resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Rob

Try Dashboard > PageLines > Site Options > Blog And Posts

Scroll down to "Full Width Post Meta" where you'd edit the shortcodes in the same format shown.

I restored this topic to Open. Please explain further what needs to be done. Thanks.

  • Like 1

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Audun MB

Thanks Rob. This hasn't been answered:

but what/where is the post loop file? Can I add code to functions.php in my base theme, or do I need to add a separate file with the same name as the post loop file?

There has to be a file somewhere in the framework that deceides that there should be a comma separating categories trough the the_category-function (BTW: default is space, not comma according to WP Codex), and I wonder if anyone know what file this is. Half the documentation for the Framework on the wiki is unfinished so it's hard to figure this out by myself.

Share this post


Link to post
Share on other sites
Danny

Hi,

Using your favourite FTP client navigate to

/wp-content/pagelines/includes/

The find the file called "class.shortcodes.php" and then go to line "335" and you should see this:


'sep' => ', ',
[/code]

Remove the comma and save the file. However, please bear in mind that not using the common will most likely cause confusion with your readers/users and when an update for PageLines is available, this update will remove this code edit, so you will need apply it again.

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny

The topic was marked as resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Simon

Please dont edit core files! The solutions was actually simple ;)

Most shortcodes accept attributes:


[post_categories sep=&nbsp;]
[/CODE]

  • Like 2

Share this post


Link to post
Share on other sites
Audun MB

Simon: Great, that should be added to some documentation somewhere....

  • Like 1

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

    • Queue-it
      By Queue-it+
      Hi,
      Previous webmaster has made short codes assigned to certain categories. For example: [pl_section section="loops" id="003"]  displays all the Job posts for tech. 
      But where can I assign a short code for a certain category? I can't find where to add the loop ID for the category.
       
      Thank you
       
    • Queue-it
      By Queue-it+
      I've created a new post category "Success stories" with Custom Post type UI. (in order to have a different layout for a different post category - blog post one layout, success stories another layout).
      New category "success stories" are "detached" from all the other posts, so they have a different layout, but the problem is that all of the success stories are also having the same exact content.
      So whenever I edit content (e.g. change body text) on one of success story posts, it also changes the content (body text) for all other Success story category posts. 
       
      Question: Is there a way to retain this separate category with it's own layout, and have a different content for each individual post? I'm using Pagelins templates. 
       Thanks in advance.
    • Queue-it
      By Queue-it+
      Hi,
      Is is possible to have different layouts for different Post categories? We have Blog posts, News posts and Case studies that all are posts, but is it possible to differentiate their layouts?
      So far when I change a post layout it affects all Post type pages. Could it be done somehow with creating a separate template? 
      Examples below
      https://queue-it.com/news/
      https://queue-it.com/blog/
       
    • richardjacruz
      By richardjacruz+
      I'm building a site at:
      http://dev.stevensoncraneservice.com/
      and I followed the instructions on building a "branding" area in the header:
      http://docs.pagelines.com/tutorials/creating-a-branding-area
      But, if you see the image I've attached, you'll see that there's a lot of space between the nav and the slider. Is this something I need to control with CSS in the Custom code section, or is there something else I can do that's part of the header section?

      Actually, what would also be nice is if I could put a divider line there... like an orange or a light gray.
      Thanks.
    • mzhafzah
      By mzhafzah
      Hello
      I am using DMS 2 theme and I want to create a 2 different links on my website; each link should take you to a different blog post category. Although the process is easy, yet I can not figure out how to give each category page a unique design of its own; Any change I make on any page is applied to the other (I'm aware of the universal elements like the header and footer and I a am not talking about these.)
      Since I am new to wordpress in general, I am not sure if my description is sufficient; apologies if it is not.
      TycoonJé
×