Jump to content

Archived

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

gbouck

Changing Title and Metabar position

Recommended Posts

gbouck

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
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gbouck

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
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gbouck

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
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gbouck

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
Jake

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.


Have you searched the forums yet or checked out the DMS user docs?

PageLines geek, blogging at MyUntangledLife.com

Share this post


Link to post
Share on other sites
gbouck

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
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
gbouck

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

  • Similar Content

    • jeomiland
      By jeomiland+
      Hi guys
      Hopefully an easy question. I have some custom code included in a Next section in a DMS site that I'm converting to platform5. What is the easiest way to insert my code into a "section" which I can easily add to my page structure with the platform5 page editor? I have the Embed extension but that takes javeascript, and my PHP test failed. Also have the Shortcodes extension, but looks like that only inserts objects into the WP-loop? and again, how to create a Hook that can go here?
      thanks...
    • KathleenAspenns
      By KathleenAspenns+
      I would like to upgrade my site to PHP 7, but there is an error warning in the PL Framework theme. I should think this should be fixed asap, I cannot be the only person trying to be up to date.
      1976 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
       
    • Dan Haddock
      By Dan Haddock
      DMS: Latest Version
      Running a Child Theme
      Wordpress: 4.8.3
      Plugins:
      Akismet Anti-Spam 
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools    
      Enhanced Media Library
      Flamingo
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap    
      Jetpack by WordPress.com
      Legull
      Loginizer   
      MailChimp for WordPress
      PageLines Updater
      Really Simple SSL
      Schema App Structured Data
      Sucuri Security - Auditing, Malware Scanner and Hardening  
      Uber reCaptcha
      Yoast SEO
      Problem Below
      Hi Team,
      I am looking to style the Continue Reading Button with the PHP you provided in an earlier ticket here: 
       
      I put the PHP code into my site, however I do not get my Icon back, I just get back Read More >>
      I have attached a screenshot of the code in place on my site along with the output.
      Interested to know what I may be doing wrong? - I am very new to PHP so a bit apprehensive on this.
      The Images: https://drive.google.com/open?id=0B0i4JJXa2jdQN2xoakZNRUdmaU0
      Let me know if you need any more information from me.
       
    • Jared Smith
      By Jared Smith+
      I haven't figured out how to get the "Sync Loaded Item" option in templates menu of Platform 5 to stay checked. It doesn't give me an option to save settings when I select it, and when I select it then click off the editor, it unselects. Also if I select it before loading a template, it doesn't stay checked there either.  Whats going on?
    • Queue-it
      By Queue-it+
      Hi,
      I created a Pagelines template for a "Post type" post. Whenever creating a new post page it firstly display that template post and I have to manually change it in the scope from "All of type posts " to "Current page". 
      Is there a way to fix that? 
       
       

×