Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • I would also be interested in adding additional input fields into a poll. Perhaps a tutorial is in order?

    Found my solution. Added specific height and width to the shortcode solved the issue.

    [promoslider category="mycategory" width="640px" height="192px"]

    Thanks for the awesome plugin!

    I’m having the same issue on https://spc.designly.net. I originally suspected that this was due to multiple sliders on a page, but after disabling all others the problem persisted. Any input on this topic would be much appreciated.

    Thread Starter wglassbrook

    (@wglassbrook)

    Just read your latest and retried it. Strip_tags isn’t the answer either…. It was get_permalinks all along. Missed that permutation in the code somewhere along the line. Thanks again!

    Thread Starter wglassbrook

    (@wglassbrook)

    I think I’ve stumbled into the answer. Defining the variable as…

    $test=strip_tags(get_permalink());

    …seems to be working. strip_tags. Should have known.

    Thanks for your advice vtxyzzy.

    Thread Starter wglassbrook

    (@wglassbrook)

    Yes, thats correct. The problem isn’t “the_permalink”. If I hard-code the current url into the query it works. If I try to put the variable into the query it does not work. It does not matter how I define the variable either.

    $test="the_permalink()"
    and
    $test="https://www.website.com/category/post/"
    both fail.

    This leads me to believe that I’m incorrectly passing the variable into the query. Google yields no answers to this issue either. And all indications are that I’m passing the variable to the query correctly.

    Thread Starter wglassbrook

    (@wglassbrook)

    Yes I can see what’s in the database. It is the pretty link. The table is created by a plugin and not wordpress itself.

    Thread Starter wglassbrook

    (@wglassbrook)

    Mysql is beyond my current skill set so please forgive me.

    The following code works as intended, yet I need to dynamically generate the current url, and yes, the “pretty” url is stored in this particular table.

    <?php
    $result = mysql_query("SELECT link_title, link_destination, link_total_clicks
    FROM wp_tracking_clicks, wp_tracking_links
    WHERE wp_tracking_clicks.link_id = wp_tracking_links.link_id
    AND wp_tracking_clicks.click_refer = 'https://www.website.com/category/post/'");
    
    while ($row = mysql_fetch_assoc($result)) {
        echo $row['link_title'];
        echo $row['link_destination'];
        echo $row['link_total_clicks'];
    }
    ?>

    Using either the_permalink or get_permalink doesn’t seem to make a difference.
    neither does passing these to a variable and then putting the variable in the query like the following…

    <?php
    $test=get_permalink();
    echo $test;
    
    $result = mysql_query("SELECT link_title, link_destination, link_unique_clicks
    FROM wp_tracking_clicks, wp_tracking_links
    WHERE wp_tracking_clicks.link_id = wp_tracking_links.link_id,
    AND wp_tracking_clicks.click_refer = '$test'");
    
    while ($row = mysql_fetch_assoc($result)) {
        echo $row['link_title'];
        echo $row['link_destination'];
        echo $row['link_unique_clicks'];
    }
    ?>

    Try using $post->guid instead of get_permalink().

    Do you suggest I use this directly in the query?

    <?php
    $result = mysql_query("SELECT link_title, link_destination, link_unique_clicks
    FROM wp_tracking_clicks, wp_tracking_links
    WHERE wp_tracking_clicks.link_id = wp_tracking_links.link_id,
    AND wp_tracking_clicks.click_refer = '$post->guid'");
    
    while ($row = mysql_fetch_assoc($result)) {
        echo $row['link_title'];
        echo $row['link_destination'];
        echo $row['link_unique_clicks'];
    }
    ?>

    Adjust the width of <div class=”post”> in your css.

    Thread Starter wglassbrook

    (@wglassbrook)

    Thank you very much for the input. I passed over ‘category__and’ so many times thinking it would return both categories. Perhaps the explanation on the query_posts doc page should be punched up a bit with examples of what it would return.

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