WordPress.org

Ready to get started?Download WordPress

Forums

Breadcrumb NavXT
Blog/posts root page (8 posts)

  1. duncmorley
    Member
    Posted 1 year ago #

    Hi there

    I have had to make my own page template to display my blog posts. I therefore need to add a root page for my blog posts much like the plugin already does for custom post types. Is it possible to add in a feature of 'Posts Root Page' for posts? I understand that the breadcrumb works for posts if a static page is selected in the settings but in this instance, a page template is better for me and and to have the functionality like the CPT's would be excellent.

    Thanks

    Duncan

    http://wordpress.org/extend/plugins/breadcrumb-navxt/

  2. John Havlik
    Member
    Plugin Author

    Posted 1 year ago #

    Already exists within WordPress, use the "Page for Posts" setting under Settings > Reading and then WordPress does everything for you (much better than a page template).

  3. duncmorley
    Member
    Posted 1 year ago #

    As per my original question it is not possible for me to use this method. I have custom fields that need populating on a page template for the blog homepage as well as showing the 5 latest blog posts. Using the index.php file is not enough for me in this instance. Therefore it would be good to have the same functionality as a CPT for breadcrumbs to pick the root page. Although doing it the way you have said is the normal way of doing it it is not the only way. I hope you can understand why it would be good to have this functionality.

    Regards

    Duncan

  4. John Havlik
    Member
    Plugin Author

    Posted 1 year ago #

    The showing the latest 5 blog posts part is very easy to do, though I'm assuming you probably want the archive pages to show more than 5 posts per page hence the slight problem (otherwise there is the "Blog pages show at most" setting under Settings > Reading).

    What are you trying to do with the custom fields on the blog page?

  5. duncmorley
    Member
    Posted 1 year ago #

    I know it is easy to show 5 posts using the settings method. I am using the Advanced Custom Fields plugin where I have options to change the layout of the page, hide/show areas, display related pages (that are custom picked per page), customise widget areas. All these options are available on every page and using the settings > reading method does not allow these options to work.

    I am having a look at using your method now and have now created a home.php to display my posts. How can I display the custom field data I have put in on my blog page as well as my posts that are with the loop?

  6. duncmorley
    Member
    Posted 1 year ago #

    Having spent quite a bit of time today searching the web I've come to the conclusion that quite a few people use a page template for the static post homepage instead of using the settings > reading method.

    I think a root page option for posts would be extremely beneficial to the people who go down this route. I would be interested to know what you think regarding this and if you think it would be a good addition for a future release.

  7. John Havlik
    Member
    Plugin Author

    Posted 1 year ago #

    The page template method dates back to before the settings > reading method existed, and people still spread it as the way to do things. Even though it may not be the best way.

    I'm not sure why you would bother to use postmeta for controlling the layout of a page (both widget areas and general layout), that's what page templates are for, unless you're trying to do it for individual posts (which don't exactly support custom templates). I can see the usefulness of the related pages/posts. However, for the blog page, I don't see why you would have related pages to it. You should be able to modify home.php (see http://codex.wordpress.org/Template_Hierarchy) to do what you want layout wise without using postmeta at all.

    The root page thing for custom post types was added to Breadcrumb NavXT to bring the functionality that the "Page for Posts" has to custom post types, as WordPress does not have an equivalent setting. Hence, why the classic Post post type does not have this setting (well it actually does have it, the settings page just doesn't expose it). I'm very hesitant to expose this as it really does not seem necessary, and may lead to confusion for those doing things the proper way with the "Page for Posts" setting (would be possible to have two different pages set as 'root').

  8. duncmorley
    Member
    Posted 1 year ago #

    I want my client to have as much control over the look and content of the posts homepage as possible.

    For example, changing the title of the page, intro paragraph, feature image etc. This would need to be populated on the blog page. I'm finding it hard to find a solution of of pulling this information through onto the home.php or index.php page. Do you have any ideas or suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.