Community Forums › Forums › Archived Forums › Design Tips and Tricks › Get the static front page to show entry title and content using Workstation Pro
Tagged: entry-title, site description, workstation
- This topic has 5 replies, 2 voices, and was last updated 5 years, 10 months ago by DesignOlah.
-
AuthorPosts
-
January 17, 2019 at 2:11 pm #332513DesignOlahMember
I'm using the Workstation Pro child theme and a static front page. By default, the theme uses the site description as the main page title on the front page. Looking at the demo, the text I'm talking about is "An independent digital creative agency located in your hometown."
What I'd like to do instead is show the page title (entry-title) where the site description currently is. AND add the page content (entry-content) right below the title. Currently on the Workstation Pro front page, the entry title and entry content do not appear anywhere.
I'm assuming I need to tweak the front-page.php file to do this. But I'm not skilled enough in PHP to know what to edit/add. Could someone provide a code snippet that I could add to the PHP file to add this functionality to the front page? Or offer other advice if I'm off track? Thank you!
https://my.studiopress.com/themes/workstation/#demo-fullJanuary 17, 2019 at 3:16 pm #333165Victor FontModeratorIf you are using a static front page, then front-page.php has nothing to do with your display. Front-page.php is the widgetized front page and is only active if you are using widgets to display your content on the front page.
The code that moves the site description to the genesis_after_header area is in functions.php around line 149.
Since you mentioned that you're not a developer, you may want to consider hiring one. The Workstation Pro is a little more complicated than most Studio Press themes. If you make a mistake in PHP with only one character, it will bring down your site.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 17, 2019 at 3:25 pm #333272DesignOlahMemberI am using a static front page in that I am not displaying blog posts. I am also using the front page widgets included by default in the Workstation Pro theme. In other StudioPress Genesis themes that I have worked with, there was a spot on the homepage for page title/content in addition to the front page widgets. But Workstation is not displaying page content anywhere on the front page. I'd like to add it.
I am not looking to add the site description, as you said. Workstation Pro includes the site description on the front page by default. I am wanting to replace the site description with the page title (entry-title). Then add a spot right under the page title for the page content. I want to keep all the front page widgets intact.
I am confident enough to edit the PHP files. I do it all the time. I was just looking for directions on how to achieve this.
lines 13-22 on front-page.php have code for "// Filter the homepage site description." If I replaced that chunk with code for adding in the page title and page content, would that work?
January 18, 2019 at 12:22 am #338788Victor FontModeratorIf you are using widgets, then you are not using the static home page regardless of your settings. Once you add content to a front page widget area, you automatically switch to using front-page.php. The static home page setting is overridden. This is how WordPress works.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 18, 2019 at 11:22 am #345669DesignOlahMemberOk, I see. Thank you Victor. I was using terminology based on the Reading Settings page, but seeing as how I am using front page widgets, I understand now my terminology was wrong. I am using front page widgets, therefore as you said, I must be using front-page.php.
With that sorted, is it possible to add a page entry title and page entry content (from one particular page) to the front page? If not, I'll find a different solution.
Thank you.
January 25, 2019 at 12:58 pm #467678DesignOlahMemberMy original goal was to add page title and page content to the front-page.php (using Workstation Pro) in place of the site description that shows up at the top of the page by default. But I settled for hard coding the text I wanted into the front-page.php file on line 18, like so:
$description = sprintf( '<h2 class="site-description">%s</h2><p class="home-top-text">Insert line of custom text here.</p>', $inside );
If anyone stumbles upon this thread and wants to offer a solution for my original goal, I'd love to hear it. Thanks!
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.