I’m relatively new to wordpress, but not new at all to coding.
I’m trying to understand how child themes work (or don’t as the case may be). I have used a child theme to extend a theme I purchased, and for the most part all is well.
What I want to do next is to develop a filter to remove posts from the “latest news” page. I found all the necessary documents about query_posts
and The Loop.
It would appear that the relevant code is in page.php
, and yet, when I copy the page.php
from the parent to my child, and add in some markers (e.g. a comment, so that I can prove my child is getting executed), I can tell that the code is still coming from the original parent theme.
So my question is this: What incantation do I need to do (I guess in functions.php
) to register the child version of pages.php
as being more important than the parent version?
Firstly, just want to say how great your theme is. I’m familiar with WordPress but new to actually building a site with it, so it’s been really handy having a lightweight yet powerful theme to work with.
I’ve got a couple of questions I’m having trouble with but I’ll spread them into separate posts as they might help others in future.
I’d like to change the default H1 heading that appears on a page (i.e. the page title) by using a custom field. By default WordPress puts whatever I put as the Page Title as an H1 Heading. I’d like to swap this out for a keyword optimised heading instead. I know I could add the desired content as a page title, manually amend the slug and create a custom menu, but that’s messy for the page admin.
I’ve read that you can use a custom field and amend the Pages.php file to display the custom field in place of the H1 heading. However, I can’t work out how to do this with the Quark theme. I’ve read elsewhere that I’d need to edit Functions.php, but I can’t fathom that either!
Here’s the links I’ve been trying to work from. Any ideas?
Using pages.php: https://www.getwpress.com/seo/h1-hack-for-wordpress-pages/
Using functions.php: https://halgatewood.com/wordpress-function-check-for-h1-custom-field/
Many thanks,
Rob
]]>I have created a additional sidebar2.php and was about to add that to the page.php but I don’t see how to access or customize my CSS to my other pages (id’s are 2, 8 and 11).
]]>However I also have wordpress pages and would like to add previous/next links to allow for design consistency. However the pages.php file doesnt have the ‘previous_post’ code included to use.
What can I do?
]]>I understand I can use an “exclude” but, since my theme doesn’t have a pages.php, don’t I also have to create one in order for the layout to have something to render with or to?
https://www.oceanviewrickshaw.com/pedicabs
Thank you in advance
]]>