Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Forum: Fixing WordPress
    In reply to: list bookmarks
    Thread Starter hunink89

    (@hunink89)

    Thanks to illutic it’s fixed now. For those who are interested here’s the code:

    <?php
    //var_dump($_GET[ ‘cat’ ]);
    $_GET[ ‘cat’ ] = substr( $_GET[ ‘cat’ ], strlen(‘linkcat-‘) ); // linkcat- wordt van $_GET[ ‘cat’ ] afgehaald en deze variabele is nu alleen een getal
    //var_dump($_GET[ ‘cat’ ]);

    if ( ( isset( $_GET[ ‘cat’ ] ) ) && ( is_numeric( $_GET[ ‘cat’ ] ) ) ) // $_GET[ ‘cat’ ] is beschikbaar en het is een getal
    {
    echo wp_list_bookmarks(‘category=’.$_GET[ ‘cat’ ].’&before=<li class=”link_total”>&after=&title_after=</h3>&title_before=<h3>&show_description=1&between=
    ‘);
    }
    else
    {
    echo ‘<p>Op deze pagina vind je bestanden die jou docent voor je op internet heeft gezet. Kies links je leerjaar. Daarna kun je kiezen voor je niveau, je klas of algemene bestanden.</p>
    <p>Lukt iets niet of heb je vragen? Neem contact op met je docent!</p>’;
    }
    ?>

    Forum: Fixing WordPress
    In reply to: list bookmarks
    Thread Starter hunink89

    (@hunink89)

    I was wondering if that should solve the problem, but it doesn’t.

    If ik make this:

    global $wp_query;
    $cat_obj = $wp_query->get_queried_object_id();
    var_dump($cat_obj);

    Then the output is NULL, while it should be linkcat-16 (where 16 can be anything). So that means that something goes wrong in the frist two lines. But what? I searched some documentation on the functions bu can’t figure out.

    First: Nice site!

    Second: You already gave a possible sollution. Just look to the code in Fancy. You will see there some arguments in the list_categories that decide what is or isn’t displayed. Check it in the codex, you’ll find the answer there i gues

    Forum: Fixing WordPress
    In reply to: list bookmarks
    Thread Starter hunink89

    (@hunink89)

    Illutic, thanks a lot, i’ve got the idea that this should work. But for some reason it doesn’t. I copied it almost exact from your post and it looks like this:

    <?php
    global $wp_query;
    $cat_obj = $wp_query->get_queried_object();
    if ( is_category(”) )
    {

    echo wp_list_bookmarks(‘include=’.$cat_obj->cat_ID.’&before=<li class=”link_total”>&after=&title_after=</h3>&title_before=<h3>&show_description=1&between=
    ‘);

    } else {

    echo ‘<p>Op deze pagina vind je bestanden die jou docent voor je op internet heeft gezet. Kies links je leerjaar. Daarna kun je kiezen voor je niveau, je klas of algemene bestanden.</p>
    <p>Lukt iets niet of heb je vragen? Neem contact op met je docent!</p>’;
    }
    ?>

    Maybe using something like this may work:

    <head>
    <base href=”https://www.yourwebsite.com/root&#8221; />

    Thread Starter hunink89

    (@hunink89)

    Oke, so far i found out i could use the following string:

    <?php wp_list_bookmarks(‘categorize=1&category_before=

    • &category_after=
    • ‘) ?>

      But the big question now is: how should the part where $cats is right now look?

    Thread Starter hunink89

    (@hunink89)

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