• Resolved knottulf

    (@knottulf)


    When inserting %%wpaa%% into the text-field of a page (nothing else), what shows up where the album should have been, is only this:

    <span style="color:blue; font-weight:bold; ">[WPPA+ Photo display]</span>

    Any idea?

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You most likely do not have a call to wp_head in your theme. This is required, see this fragment of header.php from the twentyten theme:

    /* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.
    	 */
    	wp_head();
    ?>
    </head>

    I am having the same issue. This plugin has worked great for months but now I see “[WPAA+ Photo display]” instead of it displaying the album.

    Thanks in advance for any and all help!

    Thread Starter knottulf

    (@knottulf)

    the wp_head(); -line did the trick for me!
    Thank you opajaap!

    wp_head(); did not work for me, any other ideas?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    If you supply a link to your site i will have a look into it.

    I have the same problem but only when displaying a list of posts. When showing a single post view the photo album shows ok.

    In this page the shortcode doesn’t get processed:
    https://www.wiserd.ac.uk/news/

    And as a single post it works:
    https://www.wiserd.ac.uk/news/wiserd-news/5th-july-celebratory-conference-for-professor-huw-beynon/

    Any pointers would be appreciated.

    Cheers,

    Lupo

    By the way, I forgot to mention that this only started happening since I upgraded WordPress to version 3.2.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I am working on this. The problem is that i cannot distinguish between the_content() and the_excerpt()
    WP strips all tags (so also the wppa+ photo display) in the_excerpt()
    So there i want the blue indicator. Currently i assume that posts based on the templates archive and search use the_excerpt() and show the indicator. If i render the wppa+ code to images in the_excerpt() you will see a few lines of javascript in the display.

    I asked on an developers forum how to distinguish between the_excerpt() and the_content(), but still no reply.

    If anybody knows this, please tell me.

    The code where i have this dillemma is in wppa_filter.php, around line 145 to 163:

    $do_it = false;
    			if ($wppa['rendering_enabled']) {
    				if ($wppa['in_widget']) $do_it = true;
    				else {
    					$do_it = true;
    					if (is_archive()) $do_it = false;	// Unfortunalely there is not such a simple thing as in_excerpt()
    					if (is_search()) $do_it = false;	// so we estimate that this is an excerpt (where my tags are stripped)
    				}
    			}
    			elseif (is_feed()) {
    				$do_it = true;
    			}
    
    			if ($do_it) { // ($wppa['rendering_enabled'] || is_feed()) && !is_archive() &&!is_search()) {	// Insert the html
    				$post_new .= wppa_albums();
    			}
    			else {											// Or an indicator
    				$post_new .= '<span style="color:blue; font-weight:bold; ">[WPPA+ Photo display]</span>';
    			}
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Further:

    So this is not because you updated wp to 3.2, i changed the filter around the same time.

    At this moment, a have a solution that almost works. I added a filter for the excerpt, and set a flag myself, so if the_excerpt() is called, i know it and can take appropriate action in the the_content() filter.

    However, the the_content() filters are run before the the_excerpt() filters, so the first excerpt of a list will still be treated as a content in stead of an excerpt.

    But, its something… if you like this temporary solution, update to wppa+ 3.1.3

    I found a discrepancy in wp.
    The documentation says about filters:

    the_content
        applied to the post content retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).

    and

    the_excerpt
        applied to the post excerpt (or post content, if there is no excerpt) retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).

    It appears that not only the_excerpt filters are run on the content if there is no excerpt, what is fine, but it works also the other way around: the the_content filters are run on the excerpt. and that is basically my problem. I will report that as a bug in wp.

    Here is an example of a page where I am still just seeing [WPPA+ Photo display]

    https://montrealchoppers.com/galleries/arturo-thunder-gatti/

    Thanks again for your help!

    Hi, I am having the same problem it only displays [WPAA+ Photo display]

    it was working fine until y actualized the new version.

    https://www.gustavoaperez.com/galeria

    thank you

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Please update to wppa+ 3.1.5, and set the debug enable switch (Table IX item 5 in the Photo albums -> Settings page) on so that i can see what happens.
    It should work now…

    Hi opajaap,

    Many thanks. The update fixed it!

    Still no luck for me even with the update

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You may add to wppa_filter.php:

    $do_it = true;

    just before:

    if ($do_it) { // ($wppa['rendering_enabled'] || is_feed()) && !is_archive() &&!is_search()) {	// Insert the html
    				$post_new .= wppa_albums();
    			}
    			else {											// Or an indicator
    				if ($wppa['is_excerpt']) $post_new .= '[WPPA+ Photo display]';	// Tags will be stripped
    				else $post_new .= '<span style="color:blue; font-weight:bold; ">[WPPA+ Photo display]</span>';
    			}

    on line 175. It may cause problems if things happen like an excerpt in a meta tag. but it is worth trying

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Displaying [WPAA Photo display]’ is closed to new replies.