Nach tagelanger erfolgloser Suche und Versuche, kam ich zu folgender Lösung.
Standard WP Galerie funktioniert nicht, ebenso nicht Responsive Lightbox von dFactory. Um eine Galerie anzeigen zu können, habe ich mir das Envira Gallery Plugin installiert und jetzt funktioniert es.
Falls mal jemand das gleiche Problem hat!
Beiträge von GriPu
-
-
Der Link zur >> Webseite << hat sich geändert!
-
Hallo zusammen,
beim Theme Voltata (ich benutze ein Child Theme) wollte ich 3 Bilder als Galerie (Lightbox Plugin ist installiert) einstellen und jetzt erscheint stattdessen ein Slider, den ich nicht abschalten kann.
Hier der Link (zum Ende scrollen)Im Haupttheme Verzeichnis habe ich eine gallery-styling.php gefunden:
PHP
Alles anzeigen<?php add_filter('post_gallery', 'voltata_post_gallery', 10, 2); function voltata_post_gallery($output, $attr) { global $post; if (isset($attr['orderby'])) { $attr['orderby'] = sanitize_sql_orderby($attr['orderby']); if (!$attr['orderby']) unset($attr['orderby']); } extract(shortcode_atts(array( 'order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => $post->ID, 'itemtag' => 'dl', 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, 'size' => 'thumbnail', 'include' => '', 'exclude' => '' ), $attr)); $id = intval($id); if ('RAND' == $order) $orderby = 'none'; if (!empty($include)) { $include = preg_replace('/[^0-9,]+/', '', $include); $_attachments = get_posts(array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby)); $attachments = array(); foreach ($_attachments as $key => $val) { $attachments[$val->ID] = $_attachments[$key]; } } if (empty($attachments)) return ''; $output = '<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">'; $output .= '<ol class="carousel-indicators">'; for($i = 0; $i < count($attachments ); $i++){ if($i == 1){ $active = ' class="active"'; }else{ $active = ''; } $output .= '<li data-target="#carousel-example-generic" data-slide-to="' . $i . '"' . $active . '></li>'; } $output .= '</ol>'; $output .= '<div class="carousel-inner" role="listbox">'; // Now you loop through each attachment $item = 0; foreach ($attachments as $id => $attachment) { if($item == 0){ $active = " active"; }else{ $active = ""; } $item++; // Fetch all data related to attachment $img = wp_prepare_attachment_for_js($id); $caption = $attachment->post_excerpt; $url = wp_get_attachment_image_src($id, 'full'); $output .= "<div class='item" . $active . "'>"; $output .= "<img src=" . $url[0] . " />"; $output .= '<div class="carousel-caption">' . $caption . '</div>'; $output .= "</div>"; } $output .= "</div>"; $output .= ' <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">' . __('Previous', 'voltata') . '</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">' . __('Next', 'voltata') . '</span> </a> '; $output .= "</div>"; return $output; }Weiß jemand, wie ich diesen Carousel Slider ausschalten kann, damit die Galerie als ganz normale Lightbox erscheint?
Danke :-)
Gruß
Petra -
ja das ist eine von etlichen Lösungen,
sie frisst aber viel php Ausführungslimit => sollte es also je Probs geben,beim Aufrufen einer "Übersichtsseite" dann denk an diese Einstellung.
kurz: dokumentier dir diese Einstellung unter dem Begriff: Fehlersuche ...
Danke für den Tipp! Das werde ich tun :grin:. -
… bis zum einhundertundersten Beitrag. Den wirst du dann hoffentlich nicht sonntags schreiben.
(Aber wenn du dann soweit bist, wirst du dir vielleicht die Frage nochmal neu stellen, ob du wirklich deinen Seitenbesuchern zumuten willst, auf einen Schlag 100 Blogbeiträge zu laden.
Die Seite ist für eine Bekannte und sie will keine Blätterfunktion. Die Blogbeiträge sind nach Jahre sortiert und ich glaube nicht, dass da überhaupt so viele Beiträge pro Jahr zusammen kommen. -
Ich habe die Lösung gefunden!
Eigentlich müsste ich mich in die Ecke stellen und schämen :?. Man kann es im Dashboard in den Einstellungen >> Lesen >> "Blogseiten zeigen maximal..." ändern. Habe den Wert auf 100 gestellt und alle Beiträge werden auf einer Archiv-Seite gezeigt.
Der Sonntag ist gerettet :grin:. -
Also, ich komme da nicht weiter :neutral: und poste jetzt einfach mal den PHP Code von "template-tags.php"
PHP
Alles anzeigen<?php /** * Custom template tags for this theme. * * Eventually, some of the functionality here could be replaced by core features * * @package Omega */ if ( ! function_exists( 'omega_content_nav' ) ) : /** * Display navigation to next/previous pages when applicable */ function omega_content_nav() { global $wp_query, $post; // Don't print empty markup on single pages if there's nowhere to navigate. if ( is_single() ) { $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( (!$next && !$previous) ) return; } if ( is_singular() && !get_theme_mod( 'single_nav', 0 ) ) { return; } // Don't print empty markup in archives if there's only one page. if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) return; $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; ?> <nav role="navigation" id="nav-below" class="navigation <?php echo $nav_class; ?>"> <?php if ( is_single() && get_theme_mod( 'single_nav', 0 ) ) : // navigation links for single posts ?> <?php previous_post_link( '<div class="nav-previous alignleft">%link</div>', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'omega' ) . '</span> %title' ); ?> <?php next_post_link( '<div class="nav-next alignright">%link</div>', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'omega' ) . '</span>' ); ?> <?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?> <?php loop_pagination(); ?> <?php endif; ?> </nav><!-- #nav-below --> <?php } endif; // omega_content_nav /** * Returns true if a blog has more than 1 category */ function omega_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { // Create an array of all the categories that are attached to posts $all_the_cool_cats = get_categories( array( 'hide_empty' => 1, ) ); // Count the number of categories that are attached to the posts $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'all_the_cool_cats', $all_the_cool_cats ); } if ( '1' != $all_the_cool_cats ) { // This blog has more than 1 category so omega_categorized_blog should return true return true; } else { // This blog has only 1 category so omega_categorized_blog should return false return false; } } /** * Flush out the transients used in omega_categorized_blog */ function omega_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'all_the_cool_cats' ); } add_action( 'edit_category', 'omega_category_transient_flusher' ); add_action( 'save_post', 'omega_category_transient_flusher' );Und dann habe ich noch eine "loop-pagination.php" gefunden:
PHP
Alles anzeigen<?php /** * Loop Pagination - A WordPress script for creating paginated links on archive-type pages. * * The Loop Pagination script was designed to give theme authors a quick way to paginate archive-type * (archive, search, and blog) pages without having to worry about which of the many plugins a user might * possibly be using. Instead, they can simply build pagination right into their themes. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU * General Public License as published by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package LoopPagination * @version 0.3.0 */ /** * Loop pagination function for paginating loops with multiple posts. This should be used on archive, blog, and * search pages. It is not for singular views. * * @since 0.1.0 * @access public * @uses paginate_links() Creates a string of paginated links based on the arguments given. * @param array $args Arguments to customize how the page links are output. * @return string $page_links */ function loop_pagination( $args = array() ) { global $wp_rewrite, $wp_query; /* If there's not more than one page, return nothing. */ if ( 1 >= $wp_query->max_num_pages ) return; /* Get the current page. */ $current = ( get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1 ); /* Get the max number of pages. */ $max_num_pages = intval( $wp_query->max_num_pages ); /* Get the pagination base. */ $pagination_base = $wp_rewrite->pagination_base; /* Set up some default arguments for the paginate_links() function. */ $defaults = array( 'base' => add_query_arg( 'paged', '%#%' ), 'format' => '', 'total' => $max_num_pages, 'current' => $current, 'prev_next' => true, //'prev_text' => __( '« Previous' ), // This is the WordPress default. //'next_text' => __( 'Next »' ), // This is the WordPress default. 'show_all' => false, 'end_size' => 1, 'mid_size' => 1, 'add_fragment' => '', 'type' => 'plain', // Begin loop_pagination() arguments. 'before' => '<nav class="pagination loop-pagination">', 'after' => '</nav>', 'echo' => true, ); /* Add the $base argument to the array if the user is using permalinks. */ if ( $wp_rewrite->using_permalinks() && !is_search() ) { $big = 999999999; $defaults['base'] = str_replace( $big, '%#%', get_pagenum_link( $big ) ); } /* Allow developers to overwrite the arguments with a filter. */ $args = apply_filters( 'loop_pagination_args', $args ); /* Merge the arguments input with the defaults. */ $args = wp_parse_args( $args, $defaults ); /* Don't allow the user to set this to an array. */ if ( 'array' == $args['type'] ) $args['type'] = 'plain'; /* Get the paginated links. */ $page_links = paginate_links( $args ); /* Remove 'page/1' from the entire output since it's not needed. */ $page_links = preg_replace( array( "#(href=['\"].*?){$pagination_base}/1(['\"])#", // 'page/1' "#(href=['\"].*?){$pagination_base}/1/(['\"])#", // 'page/1/' "#(href=['\"].*?)\?paged=1(['\"])#", // '?paged=1' "#(href=['\"].*?)&\#038;paged=1(['\"])#" // '&paged=1' ), '$1$2', $page_links ); /* Wrap the paginated links with the $before and $after elements. */ $page_links = $args['before'] . $page_links . $args['after']; /* Allow devs to completely overwrite the output. */ $page_links = apply_filters( 'loop_pagination', $page_links ); /* Return the paginated links for use in themes. */ if ( $args['echo'] ) echo $page_links; else return $page_links; } ?>In Google fand ich dies, womit man das Blättern deaktivieren könnte. Soll in die function.php kopiert werden, funzt aber nicht:
-
Danke !!!!
Oje oje, da muss ich mich erst mal zurechtfinden. Das sind echt 3 Nummern zu groß für mich 8). -
Zitat
Und ich werde aus deiner Frage nicht schlau: Warum schaust du in die comments-loop-nav.php, wenn es um die Zahl der dargestellten Beiträge (und nicht Kommentare) geht?
Weil ich beim Durchforsten sonst nix gefunden habe, was nur annähernd mit loop-Navigation zu tun hatte, da dachte ich, es wäre hilfreich, den Code mal zu posten. Als PHP Laie bzw. Lehrling macht man solche Sachen :roll:.
Danke!Dann hoffe ich, dass sich vielleicht noch jemand meldet und werde gleichzeitig beim Support mein Glück versuchen.
-
Hallo zusammen,
ich möchte gerne die Blätterfunktion der Archivbeiträge im Theme Omega deaktivieren, sodass die Beiträge endlos erscheinen.
In der Suchfunktion und bei Tante Google konnte ich nichts finden.
Hier der LinkAus der "comments-loop-nav.php" werde ich nicht schlau:
PHP<?php if ( get_option( 'page_comments' ) && 1 < get_comment_pages_count() ) : // are there comments to navigate through ?> <div class="comments-nav"> <?php previous_comments_link( __( '← Previous', 'omega' ) ); ?> <span class="page-numbers"><?php printf( __( 'Page %1$s of %2$s', 'omega' ), ( get_query_var( 'cpage' ) ? absint( get_query_var( 'cpage' ) ) : 1 ), get_comment_pages_count() ); ?></span> <?php next_comments_link( __( 'Next →', 'omega' ) ); ?> </div><!-- .comments-nav --> <?php endif; // check for comment navigation ?>Dann gibt es noch die "comments-loop.php"
PHP
Alles anzeigen<?php if ( have_comments() ) : ?> <h3><?php comments_number( '', __( 'One Comment', 'omega' ), __( '% Comments', 'omega' ) ); ?></h3> <?php get_template_part( 'partials/comments-loop-nav' ); // Loads the comment-loop-nav.php template. ?> <ol class="comment-list"> <?php wp_list_comments( array( 'callback' => 'omega_comments_callback', 'end-callback' => 'omega_comments_end_callback' ) ); ?> </ol><!-- .comment-list --> <?php endif; // have_comments() ?> <?php get_template_part( 'partials/comments-loop-error' ); // Loads the comments-loop-error.php template. ?>Danke schon mal im Voraus :-)
LG
Petra -
Super, vielen Dank für deine Hilfe!!!
Jetzt funzt es auch in den anderen Browsern :-D. -
Uiiiiih, vielen lieben Dank :lol:!!!
Im Google Browser funktioniert es, aber nicht im Mozilla, IE, Opera und Safari.
Allerdings hatte ich das schon oft bei Designänderungen und eine halbe Stunde später funktionierte es auch in den anderen Browsern. Ich warte mal ab und leere den Verlauf.Ist das jetzt ein genereller Code für dieses Thema oder ist er nur auf das Theme zugeschnitten?
Dann würde ich es nämlich überall einbauen, weil es echt nicht schön ist, wenn da immer "Kategorie" steht. -
Sorry, hier ist der Link. Es soll lediglich "Kategorie:" verschwinden ;-).
-
Hallo zusammen,
ich versuche verzweifelt die Überschrift "Kategorie" im Theme Voltata (https://wordpress.org/themes/voltata/) zu entfernen, sodass nur der Titel der Kategorie stehen bleibt.
Habe hier die Suche benutzt, aber nichts dazu gefunden.Kann mir jemand vielleicht helfen?
Danke vorab :-).
LG
Petra -
Ist nicht mein Hoster :wink:, ich mach das für ne Freundin.
Du meinst also, man könne die alte (ganz ganz uralt) Joomla HP wieder zum Laufen bringen?
Wäre nicht schlecht, bis die neue WP Seite fertig ist. -
Ich habe den Fehler gefunden!!!
Es war noch eine uralte PHP Version von 2008 aktiv, jetzt funktioniert es...hat aber die aktuelle Joomla HP zerschossen :neutral:. -
Hallo zusammen,
ich bin gerade dabei WP 4.4 auf einen Server (1und1) manuell zu installieren. Habe alles so gemacht, wie bei allen neuen WP Installationen. Beim Aufruf der /wp-admin/install.php
wird mir Folgendes angezeigt:
Parse error[COLOR=#000000]: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in [/COLOR]/homepages/27/d250515103/htdocs/wp/wp-includes/pomo/entry.php[COLOR=#000000] on line [/COLOR]61
Habe die wp-config.php 3x kontrolliert und die Benutzerrechte ebenfalls (Verzeichnisse 755/Dateien 644).
Ich muss dazu sagen, dass ich WP in einem Unterordner platziert habe, weil die aktuelle Webseite mit Joomla erstellt wurde und erst gelöscht werden soll, wenn die neue HP fertig ist.Bestimmt weiß jemand Rat, oder :???: ?
Danke!!!
-
Habe die Lösung gefunden :-).
Falls jemand mal das gleiche Problem hat, es liegt an der PHP Version und am Speicherplatz.
PHP Version 5.6 und auf ein größeres Hosting Paket (in diesem Fall bei Strato) upgraden. -
Hallo zusammen,
ich benutze das UpdraftPlus inkl. Add-on für Multisites und lade die Sicherungen auf meine Dropbox.
Bei der Sicherung einer WP Multisite wurde mir folgendes angezeigt:
"UpdraftPlus WordPress Sicherung vollständig.
Sicherung beinhaltet: Dateien
und Datenbank (Volle Sicherung)
Letzter Status: Die Sicherung ist (mit
Warnungen) abgeschlossen und nun komplett.
* Ein ZIP-Fehler ist aufgetreten - Überprüfe das Log-File für mehr Details."
Die Log Datei kann ich hier nicht hochladen, sie ist zu groß. Allerdings habe ich mehrmals diesen Hinweis entdecken können:
"The attempt to close the zip file returned an error (Unknown: ZipArchive does not return error messages). List of files we were trying to add follows (check their permissions)."
Ansonsten kann ich mit der Log Datei nicht viel anfangen.Bevor ich aber nach Fehlern suche, frage ich erst mal hier die Experten, ob es evtl. an der PHP Version liegen kann?
Bei UpdraftPlus Tools wird mir das angezeigt:
[td]
[TABLE="width: 0"]
[TR="class: updraft_debugrow"]
[TH="align: right"]Aktuelle Speichernutzung:
[/TH]38 MB
[/td]
[td]
[/TR]
[TR="class: updraft_debugrow"]
[TH="align: right"]Speicherlimit:
[/TH]256M
[/td]
[td]
[/TR]
[TR="class: updraft_debugrow"]
[TH="align: right"]PHP version:
[/TH]5.3.29
[/td]
[td]
[/TR]
[TR="class: updraft_debugrow"]
[TH="align: right"]MySQL version:
[/TH]5.5.46
[/td]
[td]
[/TR]
[TR="class: updraft_debugrow"]
[TH="align: right"]Curl version:
[/TH]7.35.0 / SSL: OpenSSL/1.0.1o / libz: 1.2.8
[/td]
[td]
[/TR]
[TR="class: updraft_debugrow"]
[TH="align: right"]ZipArchive::addFile:
[/TH]Ja
[/td]
[td]
[/TR]
[TR="class: updraft_debugrow"]
[TH="align: right"]ZIP-Archiv gefunden:
[/TH]Ja: /usr/bin/zip
[/td]
[/TR]
[/TABLE]Vielen Dank schon mal im Voraus :-)
-
Soeben eingeloggt, Plugin installiert, keine weiße Seite :shock:...alles funktioniert perfekt! Dat gibbet doch nich :oops: