Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #289509

    yvesmulkers
    Participant

    I’m trying to setup a custom rss feed for my website.
    I’ve found bits and pieces but can’t ty it together within x theme.
    I found that I can register my custom rss feed within functions.php, and have it point to a custom php file (rendering the xml for rss feed).
    I have some php files on hand that allow me to render the xml.
    But I can’t figure out what other changes need to be made to get this working.
    Where to put the custom rss rendering php file, what other placeholder files I need to create and where?
    Do I need to put something in the theme’s view folder (or is to only for templates?)

    #290174

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Do you wan to customize the feed template? In that case, you can try using a plugin for that (https://wordpress.org/plugins/feed-template-customize/).

    Let us know how it goes.

    #290647

    yvesmulkers
    Participant

    Thanks. This is for changing the default ones, that helps.
    But I was looking to add extra rss feeds.
    So I can have a standard one for rss subscription offered to my website visitors.
    And one to generate my rss email newsletter, and one to use to feed to my social media channels.
    And it would be nice if I could make these extra feeds private (hidden to the public).

    #291314

    Rue Nel
    Moderator

    Hello There,

    WordPress uses a set of feed templates to display your site’s feeds, in much the same way as it uses theme templates to display your content. These feed templates are located in the wp-includes WordPress directory. These core files are not directly compatible with the Theme system, however it is possible to use custom page templates to achieve a theme-based solution (see further information and links below) or change which templates are used.

    For more Feed customization, you can check out this article: https://codex.wordpress.org/Customizing_Feeds

    Hope this helps.

    #292833

    yvesmulkers
    Participant

    How can I have a custom page template made available to the dropdown in ‘Add New Page’ editor in the WP-Admin?
    I see the blank container | Header, Footer and others.
    And I already tried to copy a php file in the same folder, but wasn’t able to get that displayed in the template dropdown.
    Any guidance where to copy what and where to enter which function, would be very much appreciated.

    #293465

    Paul R
    Moderator

    Hi,

    You can still follow wordpress guide in creating a page template

    https://developer.wordpress.org/themes/basics/page-templates/

    You can add your page template file in the root directory of your child theme

    eg.
    wp-content/themes/x-child/page-custom.php

    Hope that helps.