Jump to content
Sign in to follow this  
markmeeker

Unique Feature Height

Recommended Posts

markmeeker

How can I set a custom height on specific pages' Features? This forum only addresses having a unique "Home" Features, however I am trying to accomplish this on other specific pages. The one thing in common between these specific pages is that they have same parent page ("Galleries"). Using the following code, I can identify the specific pages:

$parentpageid = $post->post_parent;
	$post_id_7 = get_post($parentpageid);
	$parentpagetitle = $post_id_7->post_title;
if ($parentpagetitle == "Galleries"){
		echo "test"; // set stylesheet/height variable here
	}

Can I call a custom style sheet or set the height variable here? Is there a better way to do this? Thanks!

Share this post


Link to post
Share on other sites
cmunns

You can certainly do it with CSS although the built-in page-id probably would have sufficed despite your custom solution for naming.

Share this post


Link to post
Share on other sites
markmeeker

Thanks Adam. I wasn't sure if there was a CSS class to identify the parent page-id. Apparently there is, I just overlooked it. Using your example here and replacing every instance of .home with .parent-pageid-## resolved the problem. Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×