Community Forums › Forums › Archived Forums › Design Tips and Tricks › Minimum Subscribe Button in a Post
- This topic has 11 replies, 2 voices, and was last updated 10 years, 8 months ago by akasocrates.
-
AuthorPosts
-
August 16, 2013 at 4:25 pm #56925akasocratesMember
Using Minimum. The page title and subscribe button show up on the home page as designed. Then, they go to the top, below the header when in a page. However, when in a post, I get "From the Blog" instead of the tagline...but yet the subscribe button is still there.
http://sideofthebarn.com/hello-world/
As far as I know, I did everything stock. Would appreciate your help please.
Thanks!
August 16, 2013 at 6:27 pm #56947Brad DaltonParticipantAugust 16, 2013 at 6:35 pm #56948akasocratesMemberThanks Brad. I've done that. The subscribe works on all pages, except when it's a blog post. In a blog post, instead of showing the tagline, it shows "From the Blog" on the bar where the Subscribe button is as here: http://sideofthebarn.com/hello-world/
But if you got to a WP page for example, it behaves as you would expect as here: http://sideofthebarn.com/about/
Any thoughts appreciated.
Thanks!
August 16, 2013 at 7:54 pm #56954Brad DaltonParticipantI think that's how its supposed to work.
You can make changes in the page-title.php file:
<?php if ( is_home() ) { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""""#"""">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_404() ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'Ooops!', 'minimum' ) . '<a href=""""#"""">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_post_type_archive( 'portfolio' ) || is_singular( 'portfolio') ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'From the Portfolio', 'minimum' ) . '<a href=""""#"""">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_singular( 'page' ) ) { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""""#"""">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_author() || is_category() || is_date() || is_search() || is_singular() || is_tag() ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'From the Blog', 'minimum' ) . '<a href=""""#"""">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } else { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""""#"""">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; }
So you want it to display Baseball tips for parent coaches on single posts?
August 16, 2013 at 7:57 pm #56956akasocratesMemberYeah, that's what I assumed since I really just did the stock setup for the theme. What I couldn't understand though is why have a Subscribe button there -- when there is really no call to action text. Can't imaging the SP would consider "From the blog" a CTA.
Thanks just the same Brad.
Hopefully, one of the mods have some insights.
Thanks in advance!
August 16, 2013 at 7:58 pm #56957Brad DaltonParticipantSo you want it to display Baseball tips for parent coaches on single posts?
August 16, 2013 at 8:01 pm #56958akasocratesMemberNot particularly. Frankly, perhaps not.
But if the theme loads the Subscribe button there (by design?), I'd prefer the CTA text there naturally. Otherwise, I'd just remove the Subscribe button altogether.
August 16, 2013 at 8:11 pm #56959Brad DaltonParticipantYou can try this if you like:
<?php if ( is_home() ) { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_404() ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'Ooops!', 'minimum' ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_post_type_archive( 'portfolio' ) || is_singular( 'portfolio') ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'From the Portfolio', 'minimum' ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_singular( 'page' ) ) { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_single() ) { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_author() || is_category() || is_date() || is_search() || is_singular() || is_tag() ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'From the Blog', 'minimum' ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } else { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a href=""#"">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; }
August 16, 2013 at 9:30 pm #56978akasocratesMemberThanks Brad. What was the change you made in the code above versus the default?
August 16, 2013 at 9:40 pm #56979akasocratesMemberHi Brad,
That didn't work sadly. I just removed the "button" part of the Subscribe button. It kept the word "Subscribe Now" and simultaneously pushed it beside the "From the Blog" text.
August 17, 2013 at 3:31 am #57013Brad DaltonParticipantThat's simply an example of what can be done.
You can modify the code in the page-title.php file which i tested locally and it works for me.
August 17, 2013 at 11:08 am #57051akasocratesMemberGot it. Thanks Brad.
After playing around with the demo, seems like this is expected behavior. But still would prefer to change it. I'll mess around with the code you shared.
Much appreciated.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.