• 0

DMS 2 Modal not working with child theme


Question

Posted · Report post

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

6 answers to this question

  • 0

Posted · Report post

Where are you inserting the shortcode? Link?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now