Archive Page edits

Hey Guys! Me again.

I’ve managed to do a bunch of changes by myself exploring the PHP files and CSS styling (I swear I’m about to be ready to be part of your theme builders!) but I couldn’t find a few things.

I’ve been able to edit the projects to almost where I want it to be, I only have the following few questions. These questions are about www.sequentialmac.com/projects

  1. Is there a way to remove the “Archive:” word before the Category type in its Archive page? I’m mostly looking to make my “archive” page for Projects be my main portfolio page.

  2. If I make a PHP page in a child theme, will it override the existing PHP or will it be added on like CSS? If I do this, will the changes carry on to updates?

  3. I’ve managed to style the post titles by tackling “.hentry .title-post {” in css but now when I am in the archive page, since its hyperlinked I"m having a few issues. Which CSS class/id would I have to use to edit how that hyperlink looks?

I think this will be it, at least for a while now.

Dear Miguel,

Thank you for asking.

#1.

Could you please try to add the following function to the child theme’s functions.php file? You should need to install and activate it first.

add_filter('get_the_archive_title', 'sydney_child_project_archive_title');
function sydney_child_project_archive_title($title){

	if(is_post_type_archive( 'projects' )){
		$cpt = get_post_type_object( 'projects' );
		return $cpt->labels->name;;
	}

	return $title;

}

#2.

It will be added on like CSS, unless you intentionally overwrite the plugable functions which are wrapped with the function_exists check. E.g. if ( ! function_exists( ‘sydney_setup’ ) ) :. You can overwrite this function by redeclaring it in your child theme’s functions.php file; function sydney_setup() function. You can also overwrite the PHP output in the parent theme’s if it has hooks applied either action or filter.

> … will the changes carry on to updates?

The modifications you have made in the child theme will remain.

#3.

Try the following

.entry-header .title-post a{
}

If you want your styling be applied only in the projects archive page, consider to use this one

.post-type-archive-projects .entry-header .title-post a{
}

I hope this reply helps.

Warmest regards,
Kharis

Thank you! Had the same issue.

There should be likes on this forum to show my ongoing appreciation for your help!

Sorry to revisit this post but I’m wondering if there is a way to change the word “Project” to something else, since the code posted before only removes the “Archive”.

Regards

Lucas Oliveira