• Resolved Finnwulf

    (@finnwulf)


    = How Do I Place In Custom Locations? =

    In Content:

    2. PHP Template Tag(must be below the_content())
    <?php global $mwm_aal; echo $mwm_aal->output_content_links(); ?>

    Its cryptic to me. Can you post a few lines of code and where to put them?
    I googled the_content() and came out with this code at the top of a page.template.php
    // Better anchor links
    function better_anchor_links($content) {
    global $mwm_aal;
    echo ‘<div class=”theclass”>’;
    echo $mwm_aal->output_content_links();
    echo ‘</div>’;
    return $content;
    }
    add_filter( ‘the_content’, ‘better_anchor_links’ );

    works but with weird result, it puts a “contents” between links and numbers dont count, ie.
    Contents
    1. h1link
    Contents
    1. h1link02
    Contents
    1. h1link03

    how can i get rid of the “Contents” line and let it count right?

    https://www.ads-software.com/plugins/better-anchor-links/

Viewing 1 replies (of 1 total)
  • Thread Starter Finnwulf

    (@finnwulf)

    Ok I was thinking about php
    but it was just a plugin setting

    for everyone interested it was enough to uncheck:
    -Title to display above anchor link list.
    -Numerically ordered list (otherwise bulleted list)

    to solve this, so looks like the code above is just working.

    here it is again as i forgot to quote it

    // Better anchor links
    function better_anchor_links($content) {
    global $mwm_aal;
    echo '<div class="theclass">';
    echo $mwm_aal->output_content_links();
    echo '</div>';
    return $content;
    }
    add_filter( 'the_content', 'better_anchor_links' );

    Considering i dont know php, I guess its just pure luck.

Viewing 1 replies (of 1 total)
  • The topic ‘= How Do I Place In Custom Locations? = PHP’ is closed to new replies.