Viewing 6 replies - 1 through 6 (of 6 total)
  • Grid and List templates cannot be changed. I would think you can create your own custom template that looks like the grid and add the link. I believe the plug-in author is working on something similar to permalink shortcode (I am not sure, but the author likes the idea and may work on it judging from other posts.)

    harrisr7

    (@harrisr7)

    There is no shortcode to use in the custom template that would include the link. I had to modify a PHP file to get what I wanted. Works for now, but when the plugin gets updated I loose my custom changes.

    harrisr7 – I would love to hear your strategy for this implementation.

    OK. Interesting thing. After much trial, tribulation, installs, removes, etc…, I had to completely rebuild my development sight and start from scratch since I blew the data. No theme would display and page content.

    So, I get what I want from RPB. When no activating hover, Links work anywhere on the picture. Activating hover, links work only when over the Title. Why ?? Don’t know, didn’t investigate. I do know, however, that I also added the plugins ‘Custom Post Type UI’ and ‘Custom Post Type Permalinks’ and created ‘Staff’ as a custom post type and used that post type in the portfolio on RPB.

    I did pursue how to get better customizations without messing up other pages if the theme gets updated. for example on the ‘Staff’ issue, copy the ‘page.php’ into the child theme and rename it to, say, ‘page-staff.php’ and put in whatever customizations you want. Create a ‘page.php’ in the child theme and enter this code into it:

    <?php
    if($post->post_title=='Staff') {
    	include_once(get_stylesheet_directory().'/page-staff.php');
    }
    else {
    	include_once(get_template_directory().'/page.php');
    }
    ?>

    Using this method, you can modify any template in the main theme though the child theme but only for those posts (or whatever other query able item) you want. WordPress looks first in the child theme for certain template names. By providing it one you get to decided which *actual* template gets used.

    OK. *SORRY*.

    I am working on several issues at once and didn’t realize this was concerning the staff plugin directly. In the throes of aggravation, I deleted all the changes I did to the staff directory plugin when I reset the development site. I am currently working on getting it redone now. Hopefully I can replicate what I did and will post solution later. The code I posted earlier is still rather cool to modify certain ‘page.php’ output without affecting updates on anything else.

    In the plugin directoy \classes\ subdirectory, the following modification works:

    Staff-Directory_shortcode.php -> line 230-236
    Replace the $output .= <<<EOT through EOT; with the following

    $post_link = get_permalink(get_the_ID());
          $output .= <<<EOT
            <div class="single-staff">
              <a href="$post_link">
                $photo_html
                <div class="name">$name</div>
                <div class="position">$position</div>
              </a>
            </div>
    EOT;

    The first line gets the permalink for the staff member, then I wrap the photo, name, position in the output with a HREF tag.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘grid display and adding link to each staff pages’ is closed to new replies.