• 0
Sign in to follow this  
Followers 0

Changing Title and Metabar position


Question

Posted · Report post

Hi guys,

 

I'm trying to change the title and metabar to appear after the post.  So it's a simple format:

 

post

title

metadata

 

However, this has to be done in the loop from what I understand.  My problem is that I don't have any clue how to get to that php file.  Every php file I open in the DMS theme is calling out to another location like, "setup_pagelines_template();".  Where is the template that I need to edit?  ..and upon finding that template, will it be as easy as moving the title and metabar underneath another bit of code, or will I have to make a hook to make it work instead?

 

Appreciate any assistance.

Share this post


Link to post
Share on other sites

10 answers to this question

  • 0

Posted · Report post

Well, we can try page specific CSS.

 

Is your blog page, for example, dynamic or static?  If static, it will have a page number assigned to in by WordPress.  you can find that by visiting Dashboard > Pages > All Pages.  When you edit the page, you'll see the numeric value of the page in the URL/address bar.  Make a note of it.

 

Then for your Custom Code, prefix it with

.page-id-XX (where XX is the number)

 

This will make sure that those elements you want hidden are only hidden on that one page.  But because blogs are dynamic in nature, even with a static blog page, the actual page number doesn't change even with pagination. So it will work on all the subsequent pages.

 

Since category pages, search results and archives are dynamic and not static, you won't see any changes there from the CSS this way.

 

I hope this helps.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

First, you're not supposed to be editing php files. 

 

Can you provide a link and an image of what you want to achieve?

 

I believe this can be achieved with CSS.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

gabewad.missionstudio.org

The home page will just display all the posts.  It's essentially a photo blog. 

 

The post will contain images first, then a short write up --end of post.  Then I'd like the title and meta data to appear at the bottom or underneath the post --before all the comments.  Below is a mock up of how I want the home page to appear.

 

09.08.13.ms.redesign.FULL.jpg

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

This is going to be a considerable undertaking.

 

First, my recommendation is to implement and customize a plugin called Special Recent Posts to your home page at the top of the page.  This would handle your photos.  You'd have it pull the featured image for each post, without title, excerpt, link, date or other meta data.  Just the linked thumbnail (resized using settings and with CSS) would display.  Then, your postloop can be formatted to hide the thumbnail, and display title, excerpt and meta.  In essence, this would be below the last featured image, as you desire.

 

However, you shouldn't have a comments field on a blog posts page.  People should only post comments on the actual single post, not on groups of posts. I'm not even sure you can add comments there.  If you did, people would be commenting on the collection, but it would never be linkable by visitors as the content would be dynamic.  If someone commented on a great photo of Paris, but the home/blog page showed pictures of Venezuelan beaches, let's say, then their comments will look silly. I'd recommend leaving off the comments.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I appreciate the feedback.. the comments wouldn't be there on the homepage - that was just a mockup showing how I'd want them to appear in the post.

 

That does sound like quite the undertaking.  Perhaps I have an elementary understanding of how this works, but people do put the meta data at the bottom of there posts.  From what I understand, that's not a big deal.  There's some line of code that says get_meta_data and its called out below the post content.  If that is true, can I not just take the line of code and throw it down there with the meta data that says get_post_title?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

These are the shortcodes for meta tags

[post_categories] - List of categories
[post_edit] - Link for admins to edit the post
[post_tags] - List of post tags
[post_comments] - Link to post comments
[post_author_posts_link] - Author and link to archive
[post_author_link] - Link to author URL
[post_author] - Post author with no link
[post_time] - Time of post
[post_date] - Date of post
[post_type] - Type of post

You can use these anywhere related to a post.

 

Fundamentally, you could add a TextArea to the lower area of a post in DMS, editing a post. In the TextArea, add your meta shortcodes.

 

The CSS to remove the Metabar is:

.post-meta .metabar em {
    display: none;
    font-style: normal;
    opacity: 0.7;
}

As for the blog listing, I tested and found that was tough.  Adding the meta shortcodes there was difficult.  It can be done at the end of the excerpt, but other than that, I couldn't add anything easily within the post listing. You'd have to do that with a hook, which can be quite complex.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I think this could work.  So does placing the shortcodes anywhere in the post show the data specific to the post they're in? If that's the case then I could just disable the meta bar as well as the title header with CSS and just type out the title and meta data in the bottom of the post?  That might jack up SEO rating for my site but since it's just a photo blog that's not something I'm particularly worried about.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi gbouck"] - I think @[member="Rob is definitely onto something with his suggestion on how to accomplish the look you're going for in the easiest manner. To answer your question - yes, you should start by disabling the default areas with display: none; as he described. And then, if you drag the TextBox section into the bottom part of your Content/PostLoop section and add the meta tags you choose, they will display the data specific to each particular post.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Well it works out perfectly for the posts.  However.. hiding the title and meta data with the css removes it from everywhere.  This is only a problem because I have my archive page linking to: http://gabewad.missionstudio.org/category/photo/.  This would normally show the pictures with title and meta data below that.. so now it's just a page of thumbnails.

 

Is there an easy way around this?  I can't really edit the archive page content.. I'm wondering if I can separate the class defining archive titles from the post titles.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks guys. Definitely making some progress from this discussion.  I'll be sure to check back if anything else comes up!  Really appreciate all the support.

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