Community Forums › Forums › Archived Forums › Design Tips and Tricks › Going Green – Replace Site Title with Page Title
- This topic has 9 replies, 2 voices, and was last updated 10 years, 2 months ago by rfmeier.
-
AuthorPosts
-
February 7, 2014 at 6:45 pm #89267GoalSetter40sParticipant
I'm using the Going Green theme v.3.0 with WP 3.8.1. In the theme customization, you can set the "Site Title". This appears as an H1 tag on every page, which is not my preference. I know how to remove the "Site Title" by leaving this field blank, altering the style sheet or using a plugin called "Genesis Title Toggle".
I would like to place the page title (from the meta title tag) in this same place, ideally without modifying the functions.php file and instead with a plugin, or even better, by using some PHP code in one of the various fields available in the "Genesis Simple Hooks" plugin. Here is my URL:
http://www.pawleysislandscrealestate.net/real-estate/
Please advise. Thanks!
http://www.pawleysislandscrealestate.net/real-estate/February 8, 2014 at 9:01 am #89340rfmeierMemberHello,
When you say, "from the meta title tag", are you referring to the Custom Document Title under the Theme SEO Settings when editing a page within the WordPress admin?
February 8, 2014 at 12:22 pm #89355GoalSetter40sParticipantSorry, I didn't use the correct term. I meant to say "from the page titles" not "from the meta title tag". I'll try to be clearer in this explanation:
I want the page titles visible, but in a different place then where they are appearing. If you look at , you'll see "Pawleys Island Community Map" displayed in a brown font color, large font. I want that text to appear above in the green section where it currently says ["This is placed by the "Genesis - Simple Hooks" plugin in the genesis_header Hook section. It would be nice to have the page title here. PHP code is working as you can tell this current time: Sat Feb 08, 2014 18:09 pm"].
I suppose it could avoid placing PHP code in "Genesis - Simple Hooks" plugin, and instead use some CSS positioning to move it there, but it just seems cleaner and more lightweight to use some PHP code to place it in the "Genesis - Simple Hooks" plugin in the genesis_header Hook section.
Does this make sense?
February 8, 2014 at 2:41 pm #89374GoalSetter40sParticipantFebruary 8, 2014 at 2:42 pm #89375GoalSetter40sParticipantWeird, this is the second attempt to add my link using the [link] button on the toolbar of the forum editor. I'll try again, this time without using the [link] button:
http://www.pawleysislandscrealestate.net/real-estate/pawleys-island-homes-for-sale-map/
February 8, 2014 at 2:44 pm #89376GoalSetter40sParticipantFebruary 8, 2014 at 2:47 pm #89377GoalSetter40sParticipantOk, I give up on posting my URL link, but that's OK, because it's the same link that I posted originally in my opening post.
February 8, 2014 at 5:57 pm #89401rfmeierMemberI got a chance to look at it. I was able to add two callbacks to start the to get this functionality. I do not have this theme, so I just used the Genesis Sample theme.
1. If on a page or single post, add the page or post title to the 'genesis_header' area.
2. If on a page or single post, remove the default post or page title.I hope this gives you a start.
February 8, 2014 at 7:25 pm #89409GoalSetter40sParticipantThanks, Ryan. I pasted your code into the genesis_header block and ticked the "Execute PHP on this hook" box. Nothing appears is the space. What I was hoping to appear is the phrase "Real Estate" as this is the page's title. I even deactivated the "Genesis Title Toggle" plugin to make sure it wasn't interfering.
Do I need to state my theme name somewhere in the PHP code that you provided or was I supposed to use a snippet of your code? Sorry, I'm not well versed in PHP. Thanks for your help.
February 8, 2014 at 7:59 pm #89416rfmeierMemberI should have said that code was meant for the functions.php file. They won't do anything inside of another action callback. Try the following with the Genesis – Simple Hooks plugin.
If there is a 'genesis_header' field, you can paste the following code inside;
// if not single page or post, return if( ! is_singular() ) return; // display the post title genesis_do_post_title();
If there is also a 'genesis_before_entry' field, you can paste the following code inside;
// if not single page or post, return if( ! is_singular() ) return; // remove all default header hooks remove_all_actions( 'genesis_entry_header' );
As you did before, make sure to check the Execute PHP on this hook checkbox.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.