Jump to content


Photo
- - - - -

Edit page templates


  • Please log in to reply
8 replies to this topic

#1 stemie

stemie

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 22 March 2011 - 11:07 AM

I'm finding this theme a little frustrating. Now I appreciate that the backend setup is quite dynamic but say I want to remove the title of my 'about' page normally I could create a page template with the appropriate edits and then set the page template to the about page. I am at a loss how to do this with this theme? Also is there not an easy way to implement google fonts. I tried to change the main body font with no luck. Perhaps you could document the setup of google fonts a little better. I've used Google font plugins on other sites that were far easier. Can I also ask that someone get back to me last time I got no help :( I appreciate your new approach to theming I just want to be able to make minor edits but I'm finding it hard to deviate from the options that you provide. Perhaps I'm missing something.. This is the demo site

Please Login or Register to see this Hidden Content



#2 Kate

Kate

    Advocate

  • Members
  • 3039 posts

Posted 22 March 2011 - 01:34 PM

Hey Steven, You should be able to edit template.postloop.php to change which pages show the title, etc. (A simple PHP if statement...) Another option would be CSS. For Google fonts: have you tried the built-in Typography tool we have now?

#3 stemie

stemie

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 31 March 2011 - 02:28 PM

Thanks for the reply. Ive still got a few questions. Ive cant see this built in typography tool you mention. I have version 1.3 On my blog page I'm trying to get rid of the author details below the post excerpt and also edit the bit at the top 'currently viewing'. I cant seem do this? Here is a pic

Please Login or Register to see this Hidden Content

and this is the page I am referring to

Please Login or Register to see this Hidden Content

I would also like to know how to move the featured image on the left of the post title. I can do this on normal themes but for some reason this theme has got me all confused. On this single post (

Please Login or Register to see this Hidden Content

) I inserted the image at the very top of the text on the right but it only shows up on the right after one paragraph (I tired it a few times on the right and left). Why is this happening Im making sure my cursor is at the top before I insert the image.

#4 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts
  • Country: Country Flag

Posted 31 March 2011 - 07:10 PM

If you want edit things like the metabar that exists under the thumbnail and above the excerpts you can use a filter to do so. Use PlatformBase theme you can add something like this:

`
add_filter('pagelines_post_metabar', 'your_function');

function your_function($metabar){
$metabar = sprintf( '%s [post_date] ', __('On','pagelines') );
return $metabar;
}
`
This will return just your post date instead of other stuff.

If you want to edit the "currently viewing" portion you can create a file called template.postsinfo.php and copy what is inside of the section_template function inside the section.postsinfo.php file in the PlatformPro core, which would be this:

`
if(is_category() || is_archive() || is_search()):

?>




""


""


""

global $author;
global $author_name;
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
_e('Posts by:', 'pagelines'); ?>
display_name; ?>











""


`
Basically hooks and filters and overriding templates in the child theme is how you will want to make edits so that they are safe from updates to the core.

I would also like to know how to move the featured image on the left of the post title. I can do this on normal themes but for some reason this theme has got me all confused.


Where are you trying to move it.?

#5 stemie

stemie

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 01 April 2011 - 09:57 AM

Where are you trying to move it.? I want to move it into the actual excerpt not next to the heading. Thanks for your reply

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 01 April 2011 - 05:44 PM

If you want to add content into the excerpt, it will either have to be plain text (no HTML/PHP code) or a short code.

#7 zurmo

zurmo

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 08 July 2011 - 04:33 PM

Hi, Where would I add template.postinfo.php in a child theme? on the root folder of the child theme I get an error: "Fatal error: Cannot redeclare class PageLinesPostsInfo in". thanks

#8 kastelic

kastelic

    Advocate

  • Members

  • 3081 posts
  • Country: Country Flag

Posted 08 July 2011 - 09:13 PM

You don't want the copy the whole class. Just copy the content within the main function.

#9 zurmo

zurmo

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 08 July 2011 - 09:27 PM

thanks! that worked.