I have a few Graphene questions

  • bamhm182

    #1735

    1. I want to have an image next to the post’s title instead of the date. Is this possible?

    2. I want to have a static home page that’s a post, not a page. Is that possible?

    3. Is it possible to remove the links to the previous and next posts? For example, if you go to http://www.BytePen.com/Home, it shows << FlipCoin at the top. I’d like nothing to be there.

    It seems like I had a few more questions, but they’re slipping my mind at the moment…

    Mod

    Kenneth John Odle

    #17018

    I want to have an image next to the post’s title instead of the date. Is this possible?

    It is probably possible using a child theme and using one of WordPress’s or Graphene’s many action hooks. How comfortable are you coding in PHP?

    I want to have a static home page that’s a post, not a page. Is that possible?

    I’m not quite sure why you would want to do this (you might want to take a look at this page first), but no, not really. That’s a WordPress function that always pulls up a list of pages when you select “static home page” in the Reading Settings.

    That said, you could always write a post for your front page and make it a sticky post, so it would look rather like your front page.

    Welcome aboard,

    Ken

    bamhm182

    #17019

    I know next to nothing about PHP, but I’ll look into it and try to figure something out. Thanks.

    I’ll read that article and decide what to do from there. The only reason I wanted to make the home page a post was just because I wanted everything to be a post for consistency, but after glancing at that article, it seems that doing that would be a bad way to do it.

    Thanks for the welcome!

    Mod

    Kenneth John Odle

    #17020

    PHP is not that difficult if you are trying to do something simple and you have good guidance.

    Here’s a good intro to action hooks: http://www.nathanrice.net/blog/an-introduction-to-wordpress-action-hooks/

    I’ve been playing around with them a little on my blogs and may write a tutorial about them sometime soon. If you have questions, let me know.

    Ken

    bamhm182

    #17021

    Thanks again for all the help, Ken. A HUGE thanks goes to your article you linked me to. Turns out I’ve been using WordPress wrong since the day I started. >_< If anything, almost all my information should have been in pages, not posts.

    I have messed around with php a little bit, but it’s all been copy and paste. It all seems simple enough, but I haven’t really given it a real try. I’ll look at that link and see what I can do.

    Mod

    Kenneth John Odle

    #17022

    Is it possible to remove the links to the previous and next posts?

    Add this to your custom CSS:

    .post-nav {display:none;}

    Glad you found the article helpful.

    Ken

    bamhm182

    #17023

    I forgot to mention, I apparently don’t need to remove those links, now that I’m using pages properly. That code did exactly what I was originally asking for though. Thank you.

    bamhm182

    #17024

    I tried figuring out Child Themes. It made a little sense, but I still couldn’t accomplish what I was trying to do, so I went an alternate route and found where the code that presented the Child Pages was located. I edited loop-children.php from

    <?php /* The title */ ?>

    <h2 class=”post-title”>

    <.a. href=”<?php echo get_permalink($page->ID) ?>” rel=”bookmark” title=”<?php printf(esc_attr__(‘Permalink to %s’, ‘graphene’), $page->post_title); ?>”><?php if ($page->post_title == ”) {_e(‘(No title)’,’graphene’);} else {echo $page->post_title;} ?></.a.>

    </h2>

    to this:

    <?php /* The title */ ?>

    <h2 class=”post-title”>

    <?php

    if (@GetImageSize(“http://www.BytePen.com/wp-content/uploads/&#8221; .$page->post_title. “-Icon.png”))

    {

    printf(“post_title. “-Icon.png’ height=’100′ width=’100′ style=’float:left;’>”);

    }

    ?>

    <.a. href=”<?php echo get_permalink($page->ID) ?>” rel=”bookmark” title=”<?php printf(esc_attr__(‘Permalink to %s’, ‘graphene’), $page->post_title); ?>”><?php if ($page->post_title == ”) {_e(‘(No title)’,’graphene’);} else {echo $page->post_title;} ?></.a.>

    </h2>

    As you can see from my website, this worked:

    http://www.BytePen.com/OurApps/

    However, whenever Graphene gets updated, I’ll have to reimplement that. Do you have any ideas on how I could avoid having to reimplement that whenever I update Graphene?

    bamhm182

    #17025

    After looking into Child Themes a bit more, I found out that part of my issue was that I didn’t have an action hook where I needed one… I replaced my original addition with <?php do_action(“child_page”); ?> and made a test function in a Child Theme like this:

    <?php

    add_action(“child_page”, “test_action”);

    function test_action()

    {

    printf(“Test”);

    }

    ?>

    and that worked, but when I replace the print with the image, it screws up because I’m not sure how to pass the post title to function.php. Any ideas?

    bamhm182

    #17026

    So… I’m an idiot… After messing around with it for a while longer today, I realized that I actually don’t need to add any of my own code to get child pages to show an image to the left of the title, all I had to do was set the Featured Image… I have NO idea why I thought I had to modify it in some way… I think I assumed it wouldn’t work with the pages because it didn’t work for the posts…

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!