1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Static page + Blog combined? More tags not working...

Discussion in 'Web Design' started by JoeMongan, Sep 10, 2014.

  1. JoeMongan

    JoeMongan Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 24, 2013
    Messages:
    1,712
    Likes Received:
    3,554
    Location:
    International Waters
    Hey guys,

    So I have been pulling my hair out recently trying to do something with WordPress that out of the
    box its not suppose to be able to do. Let me explain what I want below and maybe there's a solution?

    I have a static homepage with content and I want to be able to add snippets of my blog articles below it.
    Also if possible I want to be able to have multiple blogs on one website. Can't seem to get my head
    around it for some reason. :D

    Next I wanted it to where I could say have 10 articles on the homepage but have only snippets with
    read more where they click it and it reveals the whole article. Well the "More" tab does not work for
    pages and only blogs. I researched the hell out of it and came up with this:

    [​IMG]

    So I added it to my page.php file under my theme. Then I used the "more" tab and yeah it shows "read more" now
    and cuts off the content, but when I click "read more" it just refreshes the page and that's all. So I added this below
    like it told me to my php file:

    Code:
    <?php
    global $more;
    $more = 0;
    ?>
    And that's when the "read more" did display on pages but like I said it just refreshes the page.

    If I add this string to the file as well:

    Then it literally doubles my content on the page. I have tried everything and I am php and code illiterate.
    If anyone can point out my mistake or have another solution for "read more" tags on WordPress pages
    then I would be thankful if you could lend a hand.

    Thanks!
    -RK
     
  2. Ventio

    Ventio Regular Member

    Joined:
    Nov 22, 2013
    Messages:
    418
    Likes Received:
    136
    Occupation:
    Content Writer
    Location:
    Ya aunties crib
    • Thanks Thanks x 1
  3. JoeMongan

    JoeMongan Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 24, 2013
    Messages:
    1,712
    Likes Received:
    3,554
    Location:
    International Waters
    That's close buddy! However I need to basically do this to homepage static articles. Nice plugin
    to know about though. :)
     
  4. hekasis

    hekasis Junior Member

    Joined:
    Mar 17, 2011
    Messages:
    140
    Likes Received:
    28
    Location:
    Bangkok
    The easiest way to do this is to look in your archive.php or category.php file and copy the code that the files uses to show excerpts of posts. The past it into your page.php file.

    Every theme is different so it is difficult to say exactly what to do.

    If the theme is using hooks, then you probably need to edit the function.php file.
     
    • Thanks Thanks x 1
  5. suade

    suade Regular Member

    Joined:
    Jul 7, 2008
    Messages:
    313
    Likes Received:
    169
    Occupation:
    Bummer
    I have same problem with my Wordpress Landing Page.Pls tell me how to add a Blog for Articles Im not good at Website making
     
  6. JoeMongan

    JoeMongan Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 24, 2013
    Messages:
    1,712
    Likes Received:
    3,554
    Location:
    International Waters
    I am going to give that a try man....Thanks!

    Yeah when I figure it out I will update you on how I did it. :)

    Keep the ideas coming guys I really appreciate it!
    -RK
     
  7. srb888

    srb888 Elite Member

    Joined:
    Jul 30, 2008
    Messages:
    3,260
    Likes Received:
    5,067
    Gender:
    Male
    Occupation:
    WebzSurfer
    Location:
    Sun, Mon, Tue, WTF, Sat!!! :)
    Use jQuery Expander plugin:
    Code:
    [URL]http://plugins.learningjquery.com/expander/index.html#getting-started[/URL]
    See demo here:
    Code:
    [URL]http://plugins.learningjquery.com/expander/demo/index.html[/URL]