Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Revian

    (@revmacian)

    I don’t think you fully understand the issue. So, let me ask this another way. Suppose you have two posts shown on the homepage. One post contains 5 words with two of those words being links to another site. The second post contains 30 words with no links. Now, suppose you set the excerpt length to a number between 5 and 30 – the first post will be seen in its entirety and the second post will have a “Read more..” link. The links in the first post are seen as text instead of links because your excerpt functionality strips links from full posts on the homepage – your readers won’t know there are clickable links when viewing the homepage. This bug isn’t present when using the built-in <!--more--> functionality that ships with WordPress.

    So, you’re asking me to pay for the pro version in order to get the same functionality that WordPress provides for free?

    Thread Starter Revian

    (@revmacian)

    Steve Stern, Dude, you ROCK! Thanks again! I’ve bookmarked that site as it has other tutorials that interest me.

    Thread Starter Revian

    (@revmacian)

    Now that I’ve successfully added the shortcode, what would I need to do in order to add a button in the editor so I don’t even need to type in the shortcode? Just click a button for the shortcode the same way you do for a normal blockquote. I’m guessing this involves adding functions to php files in the theme folder, which is fine with me.

    Thread Starter Revian

    (@revmacian)

    This works perfectly for the shortcode implementation (added to functions.php in the theme folder):

    function tipnote_shortcode( $atts , $content = null ) {
    
    	return '<blockquote class="tipnote">' . $content . '</blockquote>';
    
    }
    add_shortcode( 'tipnote', 'tipnote_shortcode' );

    And this works perfectly for the CSS styling:

    blockquote.tipnote {
        color: #313131;
        background: #dfffd9;
        border: 1px solid #a2cc99;
    }

    I’m adding the above information in case it should be useful to someone in the future.

    Thread Starter Revian

    (@revmacian)

    Steve Stern, Thank you! I actually had the shortcode implemented after reading the shortcode api page that you linked. I used to design web pages, with css, from scratch in a text editor, and I’m already familiar with php, so this was quick and easy. Thank you very much for your help and for pointing me to the shortcode api page. I love WordPress! ??

    Thread Starter Revian

    (@revmacian)

    Steve Stern, Yes, a shortcode would work perfectly for this. Thank you very much!

    Thread Starter Revian

    (@revmacian)

    The forum system botched my original question. I need to be able to enter:

    <mytipnote class="tip-note">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</mytipnote>

    It’s the <blockquote class="tip-note"> and the ending </blockquote> tag that I need to automate. or I could make it <mytipnote class="tip-note"> with a </mytipnote> tag to end the styling instead of blockquote.

    There is a button for block quotes so it follows that I should be able to add something for <mytipnote class="tip-note"> .. otherwise WordPress wouldn’t be able to style anything as a block quote when we press the blockquote button.

    I realize this may involved editing core WordPress files and I cam comfortable with that.

    I know this is possible, I just need to learn how to do it.

    Thread Starter Revian

    (@revmacian)

    Many thanks to stephencottontail and James Huff for helping to get the code in the OP visible to others. You folks are appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)