Community Forums › Forums › Archived Forums › General Discussion › Minimun Theme: How to add a link in a page title (and change it)
Tagged: minimun theme, text, title
- This topic has 5 replies, 2 voices, and was last updated 11 years, 9 months ago by
David Chu.
-
AuthorPosts
-
July 22, 2013 at 7:33 pm #51969
josbarrios
MemberI need help with this:
How can I add a link in a page title?
I want a link where say "From the blog" here in the demo:
http://demo.studiopress.com/minimum/threaded-comments/Also, I don't want the description site as the displayed text beside the suscription button.
Like here: http://demo.studiopress.com/minimum/How to add a link and change the text?
I really need help with this and I'll appreciate it. Sorry if my english is bad, am from Venezuela y solo hablo español. 🙂
http://www.josuebarrios.com/July 23, 2013 at 7:30 am #52039David Chu
ParticipantHola, Josue,
Saludos y disculpame, mi espanol no es excelente. 🙂I want a link where say “From the blog” here in the demo:
http://demo.studiopress.com/minimum/threaded-comments/Para hacer esto, mira Appearance.... Editor, y a la derecha mira "page-title.php". Se puede editar esta para anadir un "link". Es un poco complicado, pero posible.
Also, I don’t want the description site as the displayed text beside the suscription button.
Like here: http://demo.studiopress.com/minimum/En la pagina principal, no estoy seguro, pero creo que hay un sidebar/widget donde se puede cambiar el texto. (Appearance.... Widgets..... Home Featured #1, etc.).
Ciao,
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
July 23, 2013 at 10:37 am #52087josbarrios
MemberHello David. Gracias por responder.
I still have doubts. Look, here is the code in "page-title.php":
<?php if ( is_home() ) { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a class="page-title-button" href="#">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } elseif ( is_404() ) { echo '<div id="page-title"><div class="wrap"><p>' . __( 'Ooops! Error', 'minimum' ) . '<a class="page-title-button" 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 class="page-title-button" 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 class="page-title-button" 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 class="page-title-button" href="#">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; } else { echo '<div id="page-title"><div class="wrap"><p>' . esc_html( get_bloginfo( 'description' ) ) . '<a class="page-title-button" href="#">' . __( 'Subscribe Now', 'minimum' ) . '</a></p></div></div>'; }
I see in the few lines of code that the site's description will be the displayed text beside the suscription button, but I don't now how to change that line. I want another text displayed, not the page's description.
Also, in the code I see the line href="#" wich I can use to add a link in the suscription button, but don't see the line for the anchor link in the text wich I want to change.
At (Appearance…. Widgets….. Home Featured #1) I can change the first displayed social button at home, but I can't change the text beside the suscription button.
I know some CSS, but am a beginner and this is new and complicated for me. :/
I'll apreciate your help. Muchas gracias! Saludos desde Venezuela. Disculpa mi mal inglés.
July 23, 2013 at 2:37 pm #52127David Chu
ParticipantHola!
Back it up first, and then se puede cambiarlo a algo asi. En este ejemplo, hay un titulo, un URL, y el texto del link.if ( is_home() ) { echo '<div id="page-title"><div class="wrap"><p> My Titulo Aqui <a href="http://mysitio.com"> Haz Clic </a></p></div></div>'; }
Saludos de los EEUU,
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
July 23, 2013 at 3:20 pm #52136josbarrios
MemberGracias David! Thanks a lot!
July 24, 2013 at 7:19 am #52216David Chu
Participant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.