• Resolved Account

    (@nestsiarenka)


    Hello,

    Can you please help me with a kind of weird issue.
    I need to change URL of entries in the widget from permalinks to this value

    a href="get_var("SELECT meta_value FROM $wpdb->postmeta WHERE post_id= '$post->ID'"));?>"

    Can you plase point me to the right file/code which I should change.

    Thanks in advance!

    https://www.ads-software.com/plugins/wp-postratings/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    The widget is template based and the plugin replaces template variables, so you need to replace them.

    I don’t provide support for modification of the plugin but I can point you to the right direction which is this line: https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L1234

    The rest you have to figure it out.

    Thread Starter Account

    (@nestsiarenka)

    Thank you!

    Thread Starter Account

    (@nestsiarenka)

    For history, if someone needs to replace the URL in the widget:

    /wp-postratings.php – line 1225

    `// Post Template Variables
    global $wpdb;
    $post_link = $wpdb->get_var( $wpdb->prepare( “SELECT meta_value FROM {$wpdb->postmeta} WHERE post_id = %d”, $post_id));
    $post_title = get_the_title($post_data);
    if ($max_post_title_chars > 0) {
    $post_title = snippet_text($post_title, $max_post_title_chars);

    You should modify the select to wpdb for your needs

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change the URL of entries in widget’ is closed to new replies.