Support » Plugin: Document Gallery » Title Position

  • Resolved mliddle

    (@mliddle)


    Is it possible to move the title for each documents above the thumbnails instead of below? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dan Rossiter

    (@danrossiter)

    Hi mliddle,

    I apologize for the delay in getting you a solution for this. I haven’t forgotten about you, just need the time to find you a good solution.

    I will try to get you an answer this evening.

    -Dan

    Plugin Author demur

    (@demur)

    Hi mliddle!

    I’m terribly sorry it took so long for You to get a reply; ‘ve been quite busy lately. And thank You for the patience.

    There are two ways to reach Your goal.
    One is custom CSS, we’ve tried our best to do that, You can have a look here for Dan’s code, unfortunately there is no clean way to get neat and tidy result.
    Another way to use templating feature of the Document Gallery 😉
    To make use of this option You should paste given below code to functions.php file of Your active WordPress theme, this can be done either using Dashboard -> Appearance -> Editor -> Theme Functions (for the active theme), or through FTP.

    function dg_title_over_img($icon, $use_descriptions, $id) {
        $patterns = array('/>(\s*)<img/im',
            '/>\s*<span class="title">%title%<\/span>(\s*)<\/a>/im');
        $replace = array('>$1<span class="title">%title%</span>$1<img',
            '>$1</a>');
        return preg_replace($patterns, $replace, $icon);
    }
    add_filter('dg_icon_template', 'dg_title_over_img', 10, 3);

    Hope this will bring the wanted performance.
    Please don’t hesitate to let us know if You run into any further issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Title Position’ is closed to new replies.