Create a custom page template (or clone existing)

Posted in: Newspaper
Post count: 317

Hi

I want to create a custom page template and copy everything from the “Homepage – with Article list”. I would like to style it a differently and don’t want to conflict with the existing template.

Please help.

Thanks

Post count: 322

That should be the file page-homepage-loop.php in the root directory of the Newspaper theme. Copy the contents to a new file named page-homepage-custom.php and edit the following line at the top of the file.

/* Template Name: Homepage - with article list */

To read like:

/* Template Name: Homepage - Custom with articles */

Then upload that changed file to the theme directory root where you found its source. The new page template should now be showing in the templates drop-down menu on the editor screen. Make your desired changes to that file.

Let me know if I missed anything, guys.

Post count: 317

Thanks @Kronos17! I thought they had a custom function for this template settings cause it looked a bit different than the original WP settings. Should’ve tried it before asking. Sorry and thanks again!

Post count: 317

Hey, I couldn’t understand how to edit how it looks like? I want to change how the title and other stuff look like. Please help.

Post count: 322

Well keep in mind that getting a new page template is the easy part. In order to make use of the loop feature after the page content and other features from Newspaper, you’ll have to study the functions and tags used by tagDiv and use them in your custom template. It’s not always easy to connect the dots on some of the functions so just remember to ask questions about specific issues here on the forum so they can help you.

No worries, and good luck!

Post count: 322

If you’re just wanting to change how things look, and not move things around, then you should using custom CSS. Use FireFox or Chrome to open the existing page, right click on the part you want to modify and select “Inspect Element” from the context menu. You can see the style classes and IDs used to target your CSS changes.

Post count: 317

I know but if I change the CSS for one class, it is going to change everything on all the other part of the theme but I want to use custom class and make it look a bit different.

Post count: 322

Well that’s what you can use the custom page template for, to add classes. Then again, depending on what you’re trying to do overall, VC can handle what you need.

Just create your page using the default page template with the articles list and add the styles for that page to the page via the VC page settings (grey cog at the top right of the editor screen). You can also edit rows and columns and enter custom CSS there as well.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.