• I’m attempting to add a “More News …” link to the end of my Featured Posts (Style 1) widget on the home page and have a pair of problems I haven’t been able to fix:

    (1) What URL can I use here? Oddly, “/news/page/2/” returns a 404, and I can’t seem to find a URL that properly displays posts from all categories. (At the moment I’m just linking to one author’s archive.)

    (2) I’ve added the HTML for this to inc > widgets > colormag-featured-posts-widget.php, but I’d obviously like to avoid the customization being overwritten whenever the plugin is updated.

    I understand this is not a standard theme file and so cannot be overridden with a child theme file of the same name. Is there somewhere I can call my child theme’s version of colormag-featured-posts-widget.php instead, so it is not overwritten when Colormag is updated?

    Thank you!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @darren_s,

    Thank you for writing in,

    1) We have checked your site and found that the https://www.scifistream.com/news/page/2/ page is not available at your site, so it is showing a 404 error. You will need to replace the valid link. For example, you can create a custom page and use the link of that page, or you can use the category link to redirect them to your category page.

    2) Editing the parent theme is not recommended because, as you said, the theme update will erase your customization. We highly recommend you customize your site using a child theme to save your customization.

    Editing the parent theme using the child theme entirely depends on your programming skills. We recommend you check this link: https://www.buildersociety.com/threads/wordpress-child-theme-includes-files-not-overriding-parent-version.6891. You will find valuable information that will help you customize the parent theme using the child theme.

    Best regards!

    Thread Starter Darren_S

    (@darren_s)

    Thank you for the response. On the second point, what I’m looking for is which file (and location) in the parent theme to copy to my child theme that will let me customize the featured posts widget. In other words, where in ColorMag can I find the include statement for inc > widgets > colormag-featured-posts-widget.php?

    Copying just this file to a child theme does not override the parent. (I’m having the same problem as Bob_the_Builder in the thread you linked, and you’ll see at the end of the thread that it is unresolved for him as well.) I’m not sure if this is because WordPress ignores includes, or if there is another reason. But I thought if I figure out where the widget .php is being called, or rewrite the function in the child theme’s functions.php to use the child theme’s directory, I might be able to get around the problem.

    Hi @darren_s,

    The PHP file depends on which widget you would like to customize. In the inc > widgets?folder, you will find the list of widget files. It would be best to create the same directory on your child theme and the same file name to override the parent theme widget features according to your needs. You do not need to call the widget on your child theme again. Also, to know which file you must customize, you can compare the widget and the file name on the inc > widgets?folder.

    I hope this information helps.

    Regards!



    Thread Starter Darren_S

    (@darren_s)

    Thanks, Amrit. I did create the inc > widgets folder on my child theme, and made a copy of colormag-featured-posts-widget.php for Featured Posts (Style 1). But edits to this don’t do anything, as evidently this file does not take precedence over the parent theme. I have to make my edits to the same file in the parent theme … hence my reason for creating this thread.

    Is there perhaps an issue with the theme path declaration somewhere? I’d love to just use the child theme if this particular widget file can take priority.

    Hi @darren_s,

    We will need to check your child theme customization, so we will need the child theme file. This is a public platform, so we do not recommend sharing the file here.

    Please go to the https://themegrill.com/ site and use the live chat feature. Upload the child theme file and this support topic link. We will look into it and get back to you on this support topic with the appropriate suggestions.

    Regards!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add ‘More News’ Page 2 Link to Home?’ is closed to new replies.