Forums

[Plugin: Yet Another Related Posts Plugin] The XHTML code it's not correct (7 posts)

  1. Covi
    Member
    Posted 3 years ago #

    The code (X)HTML generated by YARP it's not correct... ¿you know XHTML???:

    For example:

    For example: <li></li> or <dl></dl>

    its not the same. oO?
    UL, OL = DL
    LI = DT and DD

    <h4>Related posts</h4><dl>
    <dt><a href='PERMALINK1'>RELATED TITLE 1</a>
    	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt...<dd></dt>
    <dt><a href='PERMALINK2'>RELATED TITLE 2</a>
    	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt...<dd></dt>
    <dt><a href='PERMALINK3'>RELATED TITLE 3</a>
    	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt...<dd></dt>
    <dt><a href='PERMALINK4'>RELATED TITLE 4</a>
    	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt...<dd></dt>
    <dt><a href='PERMALINK5'>RELATED TITLE 5</a>
    	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras tincidunt...<dd></dt>
    </dl>

    brrrr... ¬¬

    The excerpt should be into dd (or dt) but dd outside of dt.

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. @Cogi -- you can change what tags (and in fact, what code you use at all) in the options page under "before/after related posts" and "before/after the excerpt". If you need more control, YARPP 3.0 will offer a powerful new templating system: http://mitcho.com/blog/projects/yarpp-3-templates/

    mitcho

  3. Covi
    Member
    Posted 3 years ago #

    If u let me another small suggestion... ;)

    Magic:line 47

    // Fetch keywords
    $body_terms = post_body_keywords();
    $title_terms = post_title_keywords();
    echo "<!--TITLE TERMS: $title_terms-->"; // debug
    echo "<!--BODY TERMS: $body_terms-->"; // debug

    If the method related_entries() it's called directly:
    related_entries($args, $echo = false) and u have, for example, php-exec plugin, the_content can be output.

    I don't check all code but a simple modification as:

    if ( $yarpp_debug ) {
    	if ($yarpp_debug) echo '<!--TITLE TERMS: ' . post_body_keywords() . '-->'; // debug
    	if ($yarpp_debug) echo '<!--BODY TERMS: ' . post_title_keywords() . '-->'; // debug
    }

    resolves the problem a safe way.

    Cheers ;)

  4. Covi
    Member
    Posted 3 years ago #

    Ups... can't edit:

    if ( $yarpp_debug ) {
    	echo '<!--TITLE TERMS: ' . post_body_keywords() . '-->'; // debug
    	echo '<!--BODY TERMS: ' . post_title_keywords() . '-->'; // debug
    }

    PD: It's CoVi xDDD and... well, I guess will check the 3.0 version.

  5. @Covi, I'm not sure how the "fix" you recommend has any effects with your first point on matching tags. Am I missing something?

  6. Covi
    Member
    Posted 2 years ago #

    Ufff... sorry belated posting, now I lost the focus of code but can be say:

    I seem to remember the fix prevent the output of the_content of post with php_exec plugin.

    If the method related_entries() it's called directly:
    related_entries($args, $echo = false) and u have, for example, php-exec plugin, the_content can be output.

    Sorry, I need check this with more time :(

  7. @Covi - thanks for that note. Yes, if you could get some details that would be very helpful. :)

Topic Closed

This topic has been closed to new replies.

About this Topic