Shortcode renderer components for DigiValt CPTs (Members, Testimonials, Projects, etc.)
npm install @marvalt/shcoderwp-custom-api-endpoints WordPress plugin, which auto-discovers CPTs and registers shortcodes dynamically.
bash
npm install @marvalt/shcoder
`
Usage
$3
#### Member Components
- MemberCard - Displays a single member profile
- MemberCardsGrid - Displays multiple members in a grid layout
- MemberSlideshow - Displays members in a rotating slideshow
#### Testimonial Components
- TestimonialCard - Displays a single testimonial
- TestimonialCardsGrid - Displays multiple testimonials in a grid layout
- TestimonialSlideshow - Displays testimonials in a rotating slideshow
$3
- useMembers - Fetch members based on shortcode attributes
- useMember - Fetch a single member by ID
- useTestimonials - Fetch testimonials based on shortcode attributes
- useTestimonial - Fetch a single testimonial by ID
WordPress Shortcodes
The following shortcodes are automatically registered by the wp-custom-api-endpoints plugin:
$3
- [member_card id="123"] - Single member profile
- [member_cards tax="leadership" cols="3" image="true"] - Member grid
- [member_slideshow category="leadership" interval="5000" show_bio="true"] - Member slideshow
$3
- [testimonial_card id="123"] - Single testimonial
- [testimonial_cards category="external" cols="2"] - Testimonial grid
- [testimonial_slideshow category="external" interval="5000"] - Testimonial slideshow
Configuration
Set the WordPress API URL in your environment:
`env
VITE_WORDPRESS_API_URL=https://your-wordpress-site.com/wp-json
``