Rafa?
Forum Replies Created
-
Thank you very much!
Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] File size restriction for single imageHi Joachim,
Thank you for your assistance. (I didn’t receive an email on your replay, as usually, that’s why my delayed answer).
No chances to set a filter eg.
wp_handle_upload_prefilter
to check if current post type isadvanced_ads
(i believe), then don’t pass too heavy image?Best regards!
Forum: Plugins
In reply to: [Estatik Real Estate Plugin] How to customize PDF templateGoing to tackle. Seems to be a hard task ??
Thank youForum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Change DIV to ASIDE tagI’ve figured out a workaround earlier.
Used Insert after nth paragraph
My $ad_code =<aside class="advads-content">[the_ad_placement id="the-name-of-my-manual-placement"]</aside>
where i put the shortcode of my Manual Placement.Do you think this solution is safe / has any weaknesses?
Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Change DIV to ASIDE tagThank you!
I’ve changed the type to
'post_content'
. Works!function advads_change_wrapper_div( $output, $ad ) { $options = $ad->options(); if (isset($options['placement_type']) && $options['placement_type'] === 'post_content') { $output = preg_replace( '/^(<div )/', '<aside ', $output ); $output = preg_replace( '/(<\/div>)$/', '</aside>', $output ); } return $output; } add_filter( 'advanced-ads-ad-output', 'advads_change_wrapper_div', 10, 2 );
To be honest, I’d prefer to change the most outer tag of the AdvAds insert. Now it happens on container with
[class$="target"]
.Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Change DIV to ASIDE tagThank you, Joachim!
It would be great if I may alter the tag only on content placements (after nth paragraph). How to filter only them?OK, i see.
Not 3.2.1? (this release doesn’t fix)
OK, waiting patiently ??@bornforphp Fingers crossed for you ??
@bornforphp Merging has no effect on the issue.
I’m very convinced that the minification algorithm needs to be improved.
How it deals with multiple nested functions.Forum: Plugins
In reply to: [Contextual Related Posts] How to set defaults for Block?No, I can’t.
However, thank you for quite widely customizable plugin.
Regards
Forum: Plugins
In reply to: [WP Show Posts] Add class to listsNeeded a little tweak (WPSP 1.2.0-alpha.3)
add_filter( 'wpsp_settings', function( $settings ) { if ( 1402 === (int) $settings['list_id'] ) { $settings['wrapper_class'][] = 'custom-class'; } return $settings; } );
or
add_filter( 'wpsp_settings', function( $settings ) { if ( '1402' == $settings['list_id'] ) { $settings['wrapper_class'][] = 'custom-class'; } return $settings; } );
wrapper_class
– main wrapper –SECTION
inner_wrapper_class
– each post wrapper –ARTICLE
Forum: Plugins
In reply to: [Contextual Related Posts] Class depending on Post FormatIt’s good idea, definitely, however, I’ll stick with the whole function. It allows me to fix another issue.
I don’t use placeholder image, then when post hasn’t got featured image, function prints empty <figure></figure> tag.Condition:
if ( 'inline' === $args['post_thumb_op'] || 'after' === $args['post_thumb_op'] || 'thumbs_only' === $args['post_thumb_op'] )
replaced to:
if ( has_post_thumbnail( $result->ID ) )
Forum: Plugins
In reply to: [Contextual Related Posts] Class depending on Post FormatI’ve also changed the title tag.
Now it looks like that:add_filter('crp_list_link','modify_output', 10, 3); function modify_output( $output, $result, $args ) { $link = get_permalink( $result->ID ); $post_format = get_post_format( $result->ID ); if (!$post_format) $post_format = 'standard'; $output = ''; $title = crp_title( $args, $result ); $link = crp_permalink( $args, $result ); $link_attributes = crp_link_attributes( $args ); $output .= '<a href="' . $link . '" ' . $link_attributes . ' class="crp_link format-' . $post_format . ' ' . $result->post_type . '-' . $result->ID . '">'; if ( 'after' === $args['post_thumb_op'] ) { $output .= '<h3 class="crp_title">' . $title . '</h3>'; // Add title when required by settings. } if ( 'inline' === $args['post_thumb_op'] || 'after' === $args['post_thumb_op'] || 'thumbs_only' === $args['post_thumb_op'] ) { $output .= '<figure>'; $output .= crp_get_the_post_thumbnail( array( 'postid' => $result, 'thumb_height' => $args['thumb_height'], 'thumb_width' => $args['thumb_width'], 'thumb_meta' => $args['thumb_meta'], 'thumb_html' => $args['thumb_html'], 'thumb_default' => $args['thumb_default'], 'thumb_default_show' => $args['thumb_default_show'], 'scan_images' => $args['scan_images'], 'class' => 'crp_thumb', ) ); $output .= '</figure>'; } if ( 'inline' === $args['post_thumb_op'] || 'text_only' === $args['post_thumb_op'] ) { $output .= '<h3 class="crp_title">' . $title . '</h3>'; // Add title when required by settings. } $output .= '</a>'; return $output; }
Better approach maybe?
Forum: Plugins
In reply to: [Contextual Related Posts] Custom class output depending on categoryadd_filter('crp_post_class','more_crp_classes'); function more_crp_classes( $post_classes ) { $post_classes .= ' new_class '; return $post_classes; }
But…
Seems not the aim to add a class to the main container, but to every post item, right?