Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter doxtra

    (@doxtra)

    Works like a charm ?? Thanks for your dedicated support!

    Thread Starter doxtra

    (@doxtra)

    Hello, thank you for your quick feedback and help. I’ve tried to insert a manual link in the “Short details” box as suggested but the link created is not clickable… I have a normal CSS text transform when hovering the hypertext link but nothing happens when I click – the mouse pointer changes to a text pointer (“I”) when hovering the whole text description.

    Thread Starter doxtra

    (@doxtra)

    Power of collective intelligence ?? Thank you vierfalter! The outcome is perfect.

    I have yet a subsidiary question: do you know how to make the modification “stable”? I have a child theme: should I simply paste this within functions.php?

    Forum: Plugins
    In reply to: [Cite] Multiple authors
    Thread Starter doxtra

    (@doxtra)

    Hi,

    We figured out that we only had to use coauthors() in cite.php like this:

    $find_string = array('{author}','{sitename}', '{title}', '{date}', '{publication_date}', '{permalink}');
        $replace_string = array(coauthors(), get_bloginfo('name'), get_the_title(), displayTodaysDate(), get_the_date(), '<a href="' . get_permalink() . '">' . get_permalink() . '</a>');
        $edited_setting = str_replace($find_string, $replace_string, $wpcp_setting[setting]);
        return '<div class="wpcp">' . $edited_setting . '</div>';

    And it worked! However, the names are printed twice now. If you’re facing the same issues, we’ve raised the issue here.

    Forum: Plugins
    In reply to: [Cite] Multiple authors
    Thread Starter doxtra

    (@doxtra)

    I meant {author} tag in the previous post.

    Forum: Plugins
    In reply to: [Cite] Multiple authors
    Thread Starter doxtra

    (@doxtra)

    Hi,

    Almost there! I’ve used Miquel’s methodology and replaced the get_the_author tag by a get_coauthors tag in cite.php like this:

    function cite_shortcode() {
        global $wpcp_setting;
    
        // Getting admin preferred date format for current date
    	if(!function_exists('displayTodaysDate')){
        function displayTodaysDate() {
            return date_i18n(get_option('date_format'));
    	}
    	}
    
        $find_string = array('{author}','{sitename}', '{title}', '{date}', '{publication_date}', '{permalink}');
        $replace_string = array(get_coauthors(), get_bloginfo('name'), get_the_title(), displayTodaysDate(), get_the_date(), '<a href="' . get_permalink() . '">' . get_permalink() . '</a>');
        $edited_setting = str_replace($find_string, $replace_string, $wpcp_setting[setting]);
        return '<div class="wpcp">' . $edited_setting . '</div>';
    }

    However, this returns an “Array” print for {authors} (while other tags are ok)…

    Did I forget something?

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