Tao yunbo
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom Permalinks] Categories Permalink not workingWhich plugin you use to create cpt?I use toolset(wp types)
Forum: Plugins
In reply to: [Custom Permalinks] Categories Permalink not workingyou can try https://www.ads-software.com/plugins/wp-htaccess-control/
it can remove CPT base taxonomy slug.
before URL is https://www.yourdomain.com/products-cat/solar-water-heaters/solar-collectors/
in Remove Taxonomies and Author Base section, the last item is Remove Products-cats Base, choose it and save.
i test it works.
- This reply was modified 7 years, 9 months ago by Tao yunbo.
Forum: Plugins
In reply to: [Featured Galleries] create shortcode function for galleryby the way, your plugin description, below –Examples–, after foreach miss a
?>
$galleryArray = get_post_gallery_ids($post->ID); <?php foreach ($galleryArray as $id) { <img src="<?php echo wp_get_attachment_url( $id ); ?>"> <?php } ?>
Forum: Plugins
In reply to: [Featured Galleries] create shortcode function for galleryThanks very much. it works great.
and i test add JS code in shortcode function before foreach, it works too.
So, will don’t need to edit php files.$jb_html .= "JS code here";
function show_gallery_function() { $galleryArray = get_post_gallery_ids(get_the_ID()); $jb_html .= "JS code here"; foreach ($galleryArray as $id) { $image_alt = get_post_meta($id, '_wp_attachment_image_alt', true); $jb_html .= "<li><a href='".wp_get_attachment_url( $id )."'> <img width='510' src='".wp_get_attachment_url( $id )."' alt='".$image_alt."' /></a></li>"; } return $jb_html; } add_shortcode('show_gallery', 'show_gallery_function');
nice plugin, cheers.
- This reply was modified 8 years, 1 month ago by Tao yunbo.
Forum: Plugins
In reply to: [Featured Galleries] create shortcode function for galleryi added below code in functions.php, the test shorcode works, but gallery function doesn’t.
/*Gallery Function*/ function show_gallery_function() { $galleryArray = get_post_gallery_ids($post->ID); foreach ($galleryArray as $id) { $image_alt = get_post_meta($id, '_wp_attachment_image_alt', true); $jb_html .= "<li><a href='".wp_get_attachment_url( $id )."'> <img width='510' src='".wp_get_attachment_url( $id )."' alt='".$image_alt."' /></a></li>"; } return $jb_html; } add_shortcode('show_gallery', 'show_gallery_function'); /*Test Function*/ function foobar_func( $atts ){ return "foo and bar"; } add_shortcode( 'foobar', 'foobar_func' );
Forum: Plugins
In reply to: [Solid Mail – SMTP email and logging made by SolidWP] Some Errors Occurredactually the user name should be full email address. it is wrong like:Username: projects.web
Forum: Plugins
In reply to: [Solid Mail – SMTP email and logging made by SolidWP] Some Errors Occurredi think you are on BLUEHOST.
Seems I have this problem on BLUEHOST as well.