How to link to a alternative page in CSS

Two options. The first would be as you said to determine the browser size using javascript. Then have your code do something where it changes the link if the browser us either above or below a certain size. The second, and this may be your preferred method, would be to use css. If your theme … Read more

post meta value as shortcode parameter

// hijack the download shortcode add_shortcode( ‘dlm_gf_form’, array( $this, ‘shortcode_dlm_gf_form’ ) ); This line just adds a shortcode from a class. I checked this plugin’s class and they didn’t provide any actions or filter. You can try to modify original code of this plugin for your purposes only. I don’t see any other solution. I … Read more

template_redirect to accompany with a shortcode

The answer below doesn’t directly answer your question but provides a possible alternative solution. Drop has_shortcode( $post->post_content, ‘my-shortcode’ ) statement. There is no need to check this if you are validating nonce. So the validation should look something like this. function project_registration_login_redirection(){ if ( !isset( $_POST[‘my_submit’] ) ) { return; } // form validation here … Read more

Stream Video Player does not work with do_shortcode()?

It’s not really a shortcode, its a content filter but you can try calling the plugins function directly: if (function_exists(‘StreamVideo_Parse_content’)){ echo StreamVideo_Parse_content(“[stream flv=xxx.es/wp-content/uploads/2011/04/VIDEO-UE.mp4 mp4=xxx.es/wp-content/uploads/2011/04/VIDEO-UE.mp4 provider=video img=xxx.es/wp-content/uploads/2011/04/previo-video.jpg embed=false share=false width=500 height=333 dock=true controlbar=over bandwidth=high autostart=false opfix=true /]”); }

Is it possible not to define category on function.php and add the shortcode [shortcode cat=1] to display the products?

You can use shortcode_atts for get your category which you are pass in [home_slider cat=1]. I assume that your taxonomy is category. you can replace with your taxonomy. You can also pass multiple cat id using comma separated. for eg [home_slider cat=1,2,3]. It will return slider of that category post. function home_slider($params = array()){ extract(shortcode_atts(array( … Read more

wp_editor in add_meta_boxes does not show gallery

Make sure tinymce option has a valid value. Remove it or set it to true if you don’t pass any parameters to tinymce $editor_config = array( ‘teeny’=>true, ‘textarea_rows’=>10, ‘editor_class’=>’csec_text’, ‘textarea_name’=>’csec_body’, ‘wpautop’=>false, ‘tinymce’=>$tinymce_options //THIS OPTION SHOULD BE VALID ); Edit: Made a small research. Add wpview in plugins argument of tinymce options. $tinymce_options = array( ‘plugins’ … Read more

Calling function from within functions.php returns unwanted value

Inside this loop: foreach ( $attachments as $id => $attachment ) { $link = isset($attr[‘link’]) && ‘file’ == $attr[‘link’] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); $output .= “<{$itemtag} class=”gallery-item”>”; $output .= “<span class=”photos-comment-number-wrap”><span class=”comment-number”>”. comments_number() .”</span></span>”; $output .= ” <{$icontag} class=”gallery-icon”> $link </{$icontag}>”; if ( $captiontag && trim($attachment->post_excerpt) ) { $output … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)