Skip Navigation

[Gelöst] Show Hidden links

This support ticket is created vor 4 Jahren, 7 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von David Gimenez vor 4 Jahren, 7 Monaten.

Assistiert von: Shane.

Author
Artikel
#1610981

Hi.

I'd like to see the hidden links of this post: https://toolset.com/forums/topic/filtering-artist-by-selecting-the-first-letter-of-the-title/#post-602852

Is it possible?

Thanks!

#1611381

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi David,

While i'm unable to unhide the links due to the thread not being my own, I can however paste the solution here for you.

[wpv-layout-start]
    [wpv-items-found]
    <a href="[current_url]">All</a>
    <!-- wpv-loop-start -->
        <wpv-loop>
            <a href="?wpvalphabet=[wpv-taxonomy-title]">[wpv-taxonomy-title]</a>
        </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]
add_shortcode( 'current_url', function(){
   
    $request = $_SERVER['HTTP_HOST'].strtok($_SERVER["REQUEST_URI"],'?');
    $protocol = '<em><u>versteckter Link</u></em>';
   
    if ( isset($_SERVER['HTTPS']) ) {
        $protocol = '<em><u>versteckter Link</u></em>';
    }
   
    return $protocol . $request;
} );
[wpv-layout-start]
[wpv-view name="alphabet-terms"]
[wpv-items-found]
<!-- wpv-loop-start -->
        <wpv-loop>
            <h3>[wpv-post-link]</h3>
        </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]
add_filter('wpv_filter_query', 'func_filter_by_title', 10, 2);
function func_filter_by_title($query, $setting) {
 
global $wpdb;
     
if($setting['view_id'] == 9999) {
         
        if(isset($_GET['wpvalphabet']) and $_GET['wpvalphabet']!='' ){
             
             
            $first_char = $_GET['wpvalphabet'];
            $postids = $wpdb->get_col($wpdb->prepare("SELECT      ID
                                                        FROM        $wpdb->posts
                                                        WHERE       SUBSTR($wpdb->posts.post_title,1,1) = %s
                                                        AND post_type = '".$query['post_type'][0]."'
                                                        AND post_status = 'publish'
                                                        ORDER BY    $wpdb->posts.post_title",$first_char)); 
                                                         
                  $query['post__in'] = $postids;
                  }
  }
return $query;
}

Please let me know if this helps.

Thanks,
Shane

#1612419

My issue is resolved now. Thank you!