I’m loving DW Page but have now hit a wall, unable to get the child functions.php, framework.php and shortcodes.php files to work.
I have placed them inside the correct inc folder of my child theme, for which the css is working fine, just not the PHP files.
If I copy the original functions.php to my child inc folder, it returns a Cannot redeclare bgfix() error, so I stripped it right back to:
<?php
require_once get_template_directory(). '/inc/framework.php';
?>
The framework.php file in both my parent and child folders starts like this at the top:
<?php
if( !defined('DW_PAGE_PATH') ){
define('DW_PAGE_PATH', get_template_directory() .'/' );
}
if( !defined('DW_PAGE_URI') ){
define('DW_PAGE_URI', get_template_directory_uri() . '/' );
}
/*---------------------------------------------------------------------------*/
/* Files Include
/*---------------------------------------------------------------------------*/
require_once DW_PAGE_PATH . 'inc/clients.php';
require_once DW_PAGE_PATH . 'inc/projects.php';
require_once DW_PAGE_PATH . 'inc/shortcodes.php';
require_once DW_PAGE_PATH . 'inc/testimonials.php';
require_once DW_PAGE_PATH . 'inc/nav-menus-hook.php';
require_once DW_PAGE_PATH . 'inc/users.php';
require_once DW_PAGE_PATH . 'inc/browsers.php';
require_once DW_PAGE_PATH . 'inc/customizer/customizer.php';
require_once DW_PAGE_PATH . 'inc/buddypress/bp-custom.php';
What I’m trying to do is move the title above the thumbnail, for portfolios, and also remove the carousel underneath.
I’m also trying to display only the dropdown arrow menu on the header, and get it to jump me to the relevant sections on the one page e.g. Portfolio or Testimonials, but at the moment the menu links take me to separate pages, which are not CSS styled so look horrible – and I just want my whole site on one page.
Sincere thanks in advance for any help.
Thanks. I’m a WordPress amateur and still can’t figure out how to make simple changes using a child theme.
For starters, how do I move the title of a project above the thumbnail image? If someone can help me to do this using a child theme, I’m confident I can try the other things I’m trying to change.
Hi,
Apologies for the delay in replying to you.
- Child theme issue:
- Just need download the dwpage-modern-childtheme.zip here: https://www.dropbox.com/s/nd1n06p3jlugw5t/dwpage-modern-childtheme.zip?dl=0
- Unzip and copy the dwpage-modern-childtheme folder into themes folder (wp-contentthemes).
Note:If you want to change more than just the stylesheet, your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads. For instance, if you want to change the PHP code for the site header, you can include a header.php in your child theme’s directory, and that file will be used instead of the parent theme’s header.php.
You can also include files in the child theme that are not included in the parent theme. For instance, you might want to create a more specific template than is found in your parent theme, such as a template for a specific page or category archive. See the Template Hierarchy for more information about how WordPress decides what template to use.
-
Also, you can refer here: http://codex.wordpress.org/Child_Themes
- Unfortunately, our theme have some issue with child theme, it’s bug from our theme should you does not yet change the .php file in the child theme. If you want to move the title above the thumbnail:
- Open the shortcode.php file in the folder path "wp-contentthemesdw-page-moderninc". Find/Remove the line 384 to line 389.
- Add the following code under line 372.
<div class="caption"> <h2 class="section-content-title"> <a href="#modal-'.$carouselID.'" class="show-popup" data-post="'.$project_id.'">'.get_the_title().'</a> </h2> <p class="meta">'.get_post_meta($project_id, '_project_skill', true).'</p> </div>
- To remove the Carousel section, you can add the following code to the style.css file:
.portfolio .carousel-nav { display: none; }
- To display only the dropdown arrow menu on the header:
At the moment, our theme does not support this issue, you just possible create a custom menu in this section.
Hope this helps !
Please login or Register to submit your answer
replied 10 years ago
Sorry to bump my question but I can’t do any more work on the site til I can get the child theme working. I have copied framework.php, shortcodes.php and functions.php to my child folder along with style.css. Only changes to the child style.css work, but changes to the .php pages don’t seem to work. Any ideas, Dominic or anyone?
replied 10 years ago
You can download this demo and try
https://www.dropbox.com/s/ydbw5h9rpsngh9f/child-theme.zip?dl=0
Regards.