• Resolved betoranaldi

    (@betoranaldi)


    Over the past few weeks I have been struggling with creating my first wordpress theme and want to thank everyone who has helped me out thus far.

    I am down to my last problem. I cannot get the read more <!–more–> tag to work within my listing page.

    Now reading through many posts on the forum, I come to find out that this has to do with the fact that I am create a page template to display my main blog page. The “more” tag does not work on pages.

    Now reading this site (https://moshublog.com/2007/07/26/pages-and-categories/) they suggest page categories, which I don’t think really fits what I am trying to do.

    I am using a page so that the main blog page can appear in the middle of the rest of my pages.

    How would one get around this limitation? If I have to move away from pages, that is fine, I just don’t understand how I would go about getting a link to this page to appear in the middle of my horizontal nav and function properly.

    Anyone have any suggestions?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Now reading this site (https://moshublog.com/2007/07/26/pages-and-categories/) they suggest page categories, which I don’t think really fits what I am trying to do.

    I never suggest to use “page categories” because Pages don’t have categories. Period.

    And no, the more doesn’t work on Pages because there is no “multi-Page view” in WP, so there is no need for it.

    Now, you will need to explain what your “listing page” is, and we will take from there.

    Don’t get technical, just describe WHAT is it what you want to achieve and leave the HOW to the experts.

    Thread Starter betoranaldi

    (@betoranaldi)

    Sorry, I understand that your site was not addressing my particular situation and I might have misunderstood it.

    Rather then having all of my blog posts being listed on my blog homepage, I want them listed on a subpage. I am using wordpress more like a CMS.

    I created a custom homepage that pulls in recent posts, etc. Which isn’t the problem.

    Now I am trying to create a subpage that appears in the navigation that will list the last 5 posts, paginate and having the working more tag.

    Navigation would be similar to:
    home | about us | … | … | Blog | … | etc.

    I was able to do everything with a page template (which I can post if you would like) except the read more link. Which as you pointed out, I will not be able to do using pages.

    Back to the basics.

    What you wanted (have a Page as homepage instead of listing the blog entries, aka posts) it is easily done from your own admin panel:
    admin > Settings > Reading…
    you select one (existing) Page as frontpage and another one as your “posts page”.

    I hope that’s what you did. Everything else is over-complication…

    Thread Starter betoranaldi

    (@betoranaldi)

    That is not what I did.

    I modified the index.php page to display the homepage as I would like it to display.

    Therefore, following what you said. I should have to create an index.php page that is my blog listing page.

    Create a page template that will be my homepage, create a new page for the homepage and select the homepage template.

    Then go into admin > Settings > Reading
    Select “A static page (select below)” and for the front page select my new homepage page, and then for the posts page select my blog page (which will automatically be replaced with the index.php file

    Does this sound right?

    Not exactly. You really tend to over-complicate things.

    Leave the index in its original state, don’t mess with it, because that is the general fallback for any template, if they are missing. Just the basic general standard Loop and no custom code.
    And no, it will NOT be displaying your “posts page” (aka listing the posts) – because that will be done by the generic page.php (which should also be non-edited, just the standard code!).

    As for the frontpage (homepage – yes, you should have a custom Page template. There is quite a comprehensive tutorial on my site (see it in the popular posts) how to have a static frontpage with dynamic content. And if you take the time to read the comments, too, you will find all the solutions for everything you wanted ??

    Thread Starter betoranaldi

    (@betoranaldi)

    I do apologize for over complicating things.

    I understand how to make page templates read through all of the docs and used the forums a lot, so that isn’t a problem.

    So index.php is just a generic loop through posts… got it.

    When I select my “blog” page as the “front page” in the settings area it appears to replace all of the content on this page with the index.php file.

    Is that the correct functionality?

    Now you are confusing me…

    I thought you wanted the “blog” as your “posts page” not as front.

    Thread Starter betoranaldi

    (@betoranaldi)

    Correct, lets see if this makes sense…

    I have two pages created, homepage and blog

    The homepage will not display blog posts (it does not have the standard loop)

    The blog page, which sits below the homepage will list all of the posts.

    So I went into admin > Settings > Reading
    Selected “A static page” from “Front page displays”

    Selected my homepage as the front page and the blog page as the posts page.

    Now it doesn’t matter what I have on the blog page, it seems to be overwritten by index.php

    Now this appears to be functioning the way I want it to.
    I just want to make sure that it is supposed to act this way.

    What did you write on the blog Page and why?
    Yes, it overwrites everything that you try to pu into the content (as in Write Page)

    Thread Starter betoranaldi

    (@betoranaldi)

    There was no reason for putting stuff on the blog page.

    Originally I had a custom template on that page which was being overwritten by the index.php page when I fist made the change.

    Everything is working as intended now. Thank you so much for you help, moshu!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘<!–more–> not working using page templates, what are some other options?’ is closed to new replies.