Minimun Theme: How to add a link in a page title (and change it)

Community Forums Forums General Discussion Minimun Theme: How to add a link in a page title (and change it)

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  David Chu 1 year ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #51969

    josbarrios
    Participant
    Post count: 28

    I 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/
    #52039

    David Chu
    Participant
    Post count: 1316

    Hola, 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

    #52087

    josbarrios
    Participant
    Post count: 28

    Hello 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.

    #52127

    David Chu
    Participant
    Post count: 1316

    Hola!
    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

    #52136

    josbarrios
    Participant
    Post count: 28

    Gracias David! Thanks a lot!

    #52216

    David Chu
    Participant
    Post count: 1316

    De nada, Compay! ;)


    Dave Chu · Custom WordPress Developer – likes collaborating with Designers

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.