I’m using uncode theme and I have a page heading that is showing ‘Archive: Portfolio’
I want to remove the ‘Archive:’ bit from that heading.
In the source it looks like this:
<h1 class="header-title h1"><span>Archives: Projects</span></h1>
I have tried removing Archive from all the page titles with Yoast SEO plugin but it is still showing.
Is there a way to remove that word with javascript maybe does anyone know?
Thanks!
3
Answers
I’d be wary in removing it via javascript. It seems to me that adding a piece of text somewhere in the code’s execution, and then removing it on the client-side smells like “contrived complexity”.
Take a look at the wordpress template hierarchy, and manually search for the template file that’s rendering the
Archives:
string of text.I’d start with
archive.php
, and then fall my way up through otherarchive-*.php
pages, then totaxonomy.php
category.php
, and so on.If you’re comfy in the command line, you might also consider grepping for the string:
grep -r /path/to/wp/theme "Archive:"
and sifting through the results to find the template file(s) with that on one of their lines.But if you insist on removing the string via javascript, you might try dropping something like this at the bottom of the
<body>
, via a function infunctions.php
:jsfiddle: https://jsfiddle.net/orcadj3u/