WordPress.org

Ready to get started?Download WordPress

Forums

Ryu
Using infinity sign as a permalink marker for some post types (4 posts)

  1. rossjamesparker
    Member
    Posted 10 months ago #

    I have just moved my personal blog over to Ryu (or more specifically, a child theme that I have taken to calling 'Ken'). There are a few issues that I would to resolve, and I am no php/css expert, so I would be grateful for any tips. I am going to post my issues as separate threads.

    The first issues is that in Ken, I would like some of the short post types (asides, quotations, status updates, and links) to use the infinity sign (∞) as a permalink.

    I understand that to do this I need to create derivative copied of the relevant content templates (e.g. content-aside.php) within the Ken directory, and put somewhere in there. I think the relevant section, in content-aside is this:

    <?php
    				if ( ! is_single() ) :
    					the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
    				else :
    					the_title( '<h1 class="entry-title">', '</h1>' );
    				endif;
    			?>

    However, I am not sure where in this block I need to put and whether I need to escape the characters at all?

  2. Kathryn
    Automattic Happiness Engineer
    Posted 10 months ago #

    Hi there, you might want to learn more about the get_permalink() function syntax to help you construct your code:

    Function Reference/get permalink

    For the infinity symbol, although the UTF-8 character encoding used by the theme should be able to display the ∞ character alright, just to be safe you could always use the HTML entity:

    &infin; or

    http://stackoverflow.com/questions/2254913/infinity-symbol-with-html

  3. Kathryn
    Automattic Happiness Engineer
    Posted 10 months ago #

    The editor borked the second HTML entity, let me try again:

  4. Kathryn
    Automattic Happiness Engineer
    Posted 10 months ago #

    Well, that still didn't work, but you can see the alternative HTML entity in the Stack Overflow post I linked above.

Reply

You must log in to post.

About this Theme

About this Topic

Tags