pablomon
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: From wordpress to mobile appForum: Fixing WordPress
In reply to: Device dependet contentOk. For anyone following this thread I made a similar question in the adequate forum as Steven sugested. Here is the link
Forum: Fixing WordPress
In reply to: Device dependet contentThanks for your answer @sterndata.
I took a look at the plugin but since I am using elementor I can’t wrap parts of my code with the shortcode.
Then I came across wp_is_mobile function.
Since I only need to serve different content in a few different pages I think I might be able to get around it by combining template_redirect and wp_is_mobile like so:add_action( 'template_redirect', 'mobile_redirect' ); function mobile_redirect() { if (wp_is_mobile()) { if ( is_singular( 'teachers' )) { // how to redirect using a different elementor template ? } } }
Does this make sense?
- This reply was modified 4 years, 2 months ago by pablomon.
Forum: Developing with WordPress
In reply to: Save_post hook only working on quickeditHi @bcworkz,
Thanks for your answer. Let me elaborate further.
When the user creates a “course” post on the frond end I want to be able to capture that information and use it to create the “lessons” automatically. The lessons would inherit the title, content, featured image, a taxonomy and some metas.
Likewise if the users edit a course, I want to transmit those changes to the children posts I automatically.My idea was to listen for any change on the specific post type ( its a product post type ) and then check wether its being updated or created hooking to save_post_{$post_type}. But this could just be a completely wrong approach?
I am totally new to wordpress so please forgive the terminology I am using.
Thanks!