• Resolved Robby Barnes

    (@robby-barnes)


    Hi folks,

    For several years I have been running my site on a child theme based on Cyberchimps Responsive theme.

    The situation I want to solve is not caused by a problem with the Responsive theme itself but due to a change I chose to make with its usage recently.

    My site consists of pages (not posts); these are mostly an archive of magazine articles.

    Since the beginning, the pages have been made from the theme’s Full-width page template.

    Each article page is the child of an Issue Main Page, which originally was made from a page template featuring a widget area on the left and main content area on the right.

    In order to better accommodate mobile device viewing, I have stopped using widgets and only rely on the Header Menu for site navigation.

    An example of such an issue main page can be seen at the link above.

    As you can see, there is empty space on the left.

    This could be corrected by making a new custom page template based on the theme’s Full-width page to replace the current Sidebar-content template.

    When I first made this WP site I was given a small amount of programming help in writing the template page. The person who helped me is no longer available, so I am hoping that one of you could step in and give me some advice.

    As viewed on the page, the custom coding inserts “Fifth Estate #” as the beginning of the page title followed by text of the title I assign when creating the particular issue page (in this case, “404, Summer, 2019”).

    I am hoping that one of you could show me how to transfer info from the existing page template into a new, Full-width template.

    Here is a copy of the existing Issue Main Page template:

    https://pastebin.com/embed_iframe/D2rFNzwh

    Here is a copy of a Full-width page template that could be adapted to replace the existing template:

    https://pastebin.com/embed_iframe/F87Mu5N0

    I will be grateful for any and all help.

    Robby Barnes

    • This topic was modified 5 years, 3 months ago by Robby Barnes.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • I believe this would be the simplest way. Using your current template I just made a few changes. If you are still using an older version of this theme then this is what you would want to use because of the changes to the layout in the more recent versions.

    It didn’t paste correctly here so I just put it on pastebin.

    https://pastebin.com/VNPdc7jZ

    I realized that there was an error with the code you added.

    This is the correction for your existing template.
    https://pastebin.com/qCSHkEwQ

    This is the full width page for the latest version of the theme. It has your custom code in it…
    https://pastebin.com/UiX127EZ
    The template name is Custom Full-Width Template.

    Thread Starter Robby Barnes

    (@robby-barnes)

    Hello,

    Thanks for your reply. I used the code you supplied for a replacement template page.

    The new template works well except that the title is duplocated on the page, as you can see from the link above.

    If I add CSS like .entry-title {display:none;} the problem goes away but it takes away the titles from some other full-width pages.

    Can you suggest a change to the template page I am using? A copy of template page is at

    https://pastebin.com/embed_iframe/4Gii2uxb

    Also, I would be grateful if you could verify that I have done the header correctly.

    Best,

    Robby Barnes

    https://pastebin.com/DABG8ZQD

    I removed the title from the page. If this works then you should be able to just use the default full width template of the theme and remove the text from the page if it shows twice. Be aware that you have to remove the display:none from your stylesheet if you set that before for the title. Just backup before you do it or just copy back the change if you don’t want it that way.

    It’s best practice to enter the title text on the pages instead of hard-coding them in the templates.

    Thread Starter Robby Barnes

    (@robby-barnes)

    Hello again,

    Thanks for your help. The page works well, either with the template or the built-in full-page template.

    Robby Barnes

    I’m glad it worked out. I wished I could help you out with your header but I’m just so pressed for time right now. I took a quick glance the other day and noticed that you have your search bar with the css style of position:absolute. That’s may be why it overlaps when viewing on smaller screens. I remember thinking that it was not the search bar of the theme. If it isn’t, then try just using the theme search bar and maybe adding it to the top widget for instance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Replacing custom page template’ is closed to new replies.