Jump to content

Archived

This topic is now archived and is closed to further replies.

carletto0282

Modal not working with child theme

Recommended Posts

carletto0282+    4
carletto0282

Hi guys,

 

I'm using a child theme on DMS 2 but it seems that modal shortcode doesn't work.

If I switch to DMS it work but I lost all customization I have made trough the child theme functions.php and style.less.

 

Any suggestion?

Best regards

Carlo

Share this post


Link to post
Share on other sites
GetMeWebDesign+    115
GetMeWebDesign

Where are you inserting the shortcode? Link?


Chrome Developer tools - please use them. If you are not sure how, then it is easy to learn

Be inventive in your keyword search of the forum ie Navi > Navbar > menu > tabs > font > color. Your answer lies there somewhere!

Share this post


Link to post
Share on other sites
James B    436
James B

The modal shortcode should still work with the child theme active. Were you placing in the same section on both occasions? Some sections aren't designed to take shortcodes and will not process the code so this could be what you're experiencing. Best way to test would be to place the shortcode in the main post content of the page/post with the child theme active and test it there.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
carletto0282+    4
carletto0282

I'm using the shortcode in the content of a standard page.

 

And then simply switch from DMS to child theme activating them in the theme selection page of wordpress administration area.

Share this post


Link to post
Share on other sites
James B    436
James B

Whats the child theme you're using, I'll try and replicate.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
carletto0282+    4
carletto0282

A custom one I've started with:

 

function.php 

<?php
// Setup  -- Probably want to keep this stuff... 

/**
 * Hello and welcome to Base! First, lets load the PageLines core so we have access to the functions 
 */	
require_once( dirname(__FILE__) . '/setup.php' );

setup.php

<?php

/**
 * REQUIRE THE FRAMEWORK FILES
 * --- This is some checking, and you should not have to touch this code (unless directed) ---
 * 3.4 compat added
 * Fix for php5.2
 */

if ( function_exists( 'wp_get_theme' ) ) {
	$parent_folder = wp_get_theme( basename( dirname( __FILE__ ) ) )->get( 'Template' );		
} else {
	$theme_data = get_theme_data(STYLESHEETPATH . '/style.css');
	$parent_folder = $theme_data['Template'];
}
$init_file = WP_CONTENT_DIR .'/themes/' . $parent_folder . '/functions.php';

if ( file_exists( $init_file ) )
	require_once( $init_file );
else
	add_action( 'template_redirect', create_function( '', 'echo "<p>Unable to locate the main framework files! Make sure the parent theme folder is named correctly.</p>";' ) );

and style.css

/*  
Theme Name: Child theme
Theme URI: http://www.childtheme.it/
Description: A child theme for DMS.
Version: 1.0
Author: Author
Author URI: http://author.it
Tags: developer

Template: dms

*/

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

The modal shortcode is working just fine with a child theme I created - https://cloudup.com/cR9ZKXGfLzB

 

Therefore, its either related to something you have added to your child theme, a plugin or script/code you're using.

 

You can download my child theme here - https://github.com/Dannyholt/Skeleton


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • John Olsson
      By John Olsson+
      We're often working with ACF (https://www.advancedcustomfields.com/) that's great for user experience in the backend, 'cause we don't want out clients to be in the editor to much.
      So we want to be able to use shortcodes in the editor fields, regardless of section, THIS WOULD BE SO GREAT. Is there a way to fix this, it should open up som much more functionality.
      In ACF, the shortcode is for example: 
      [acf field="field_name"] ...for example, I want to att field_names value to display in a section, i understand I can make it in embed and so, but I want it in titles and options, the whole range.
      I know I can build my own sections, that we've done, but it's not very effective, and thats what PL5 is about.
      Any ideas on this, can Pagelines take this in the core? I guessing there are more than just ACF out there who can use this.

    • flourishdesignstudio
      By flourishdesignstudio
      I am working on a multisite installation and had some questions regarding the themeing options. All the sites will have the same structure but each individual site would need a different h1 font and link color. I had originally thought that I would program/edit the parent theme to have a certain set of templates, font sizes, etc. and then that would feed to all the individual sites where I could activate the child theme and use the child theme to define the individual sites' specific link color, heading fonts, etc. So, what I was shooting for was:
      Parent theme = shared by all sites
      Child theme = specific to the minor customizations on a per site basis.
      Is this possible? Am I misunderstanding how these would actually deploy to the different sites?
    • jojoking
      By jojoking+
      I have to admit to being baffled.
      I'm trying to embed a video (from my WP media library) within a WP post using the videobox section shortcode.
      The shortcode section popup only allows two items to be configured - the section type, in this case videobox - and a unique id. There's no URL or other parameters such as autoplay or loop which are available within the Pagelines editor.
      Whatever I put in the unique ID makes no difference to what is shown which seems to be a default video with stars or white noise on a black background.
      I assume I need to define this ID somewhere else, or maybe WP has done it for me?
      HELP!
       
      PS This is the page source generated when a shortcode is added within the WP post editor
      <!-- VideoBox | Section --> <section id="videobox_1675853156" class="pl-sn pl-col-sm-12 pl-col-sm-offset-0 pl-sn-videobox" data-object="PL_VideoBox" data-clone="1675853156" data-level="0"><div class="pl-sn-wrap"><div class="pl-sn-pad fix" data-bind="pledit: true" > <div class="video-highlight"><h3 class="video-title" data-bind="pltext: vb_title"></h3></div> <div class="pl-video-box" data-bind="plcallback: { vb_autoplay: vb_autoplay(), vb_loop: vb_loop(), vb_controls: vb_controls(), vb_video: vb_video()}" data-callback="videobox"> <video id="280414138" autoplay loop > <source src="https://www.handinhandmanchester.org.uk/wp-content/plugins/pl-section-videobox/default.mp4?r=280414138" type="video/mp4" /> No browser html5 video. </video> <script> jQuery('#280414138')[0].load(); </script> </div> </div></div></section> </div>  
      If I add a videobox section using the Pagelines page editor the page source generated includes my video:
      <!-- VideoBox | Section --> <section id="videobox_udvu4uz" class="pl-sn pl-col-sm-12 pl-col-sm-offset-0 pl-sn-videobox" data-object="PL_VideoBox" data-clone="udvu4uz" data-level="0"><div class="pl-sn-wrap"><div class="pl-sn-pad fix" data-bind="pledit: true" > <div class="video-highlight"><h3 class="video-title" data-bind="pltext: vb_title"></h3></div> <div class="pl-video-box" data-bind="plcallback: { vb_autoplay: vb_autoplay(), vb_loop: vb_loop(), vb_controls: vb_controls(), vb_video: vb_video()}" data-callback="videobox"> <video id="429558737" autoplay loop > <source src="https://www.handinhandmanchester.org.uk/wp-content/uploads/2017/04/HIHWelcome.mp4?r=429558737" type="video/mp4" /> No browser html5 video. </video> <script> jQuery('#429558737')[0].load(); </script> </div> </div></div></section>  
    • bnapoli
      By bnapoli+
      On my site www.anewbeginning.com the "toggle" function mysteriously stopped working.  I have tried all browsers, tried disabling plugins, removing all the relevant CSS but still cant understand why it isn't working.
      The toggle is placed on this page: http://anewbeginning.com/?page_id=15965 and http://anewbeginning.com/?page_id=10779 but it does not display.
      On my other Platform5 websites, that exact code works fine: see here http://4aa.d11.myftpupload.com/?page_id=123
      Code is the same. Please help, thank you!
    • jagipson
      By jagipson+
      Should be a simple answer but not sure why its not doing this.  I have a child theme installed on pagelines 5 that has a hook so it will write over the theme css. Strange is that when I am on the frontend the code works but in the dashboard your theme takes over my code and its no where to be found. See examples attachments
      @Andrew @Danny


×