Forum Replies Created

Viewing 15 replies - 16 through 30 (of 30 total)
  • Hi, yes ok thank you.

    That works.

    But I haven’t tested it in the visual builder.

    So does that mean that if I have a page with a lot of content and i’m using the visual builder I can not place the logo slider on that page or what?

    The link has changed to this: http://cloudfaktura.democrunch.dk/slider/

    Hi,

    Ok thank you, but I actually just read that it says that I can only sort them according to certain things, not as I would like.:

    Options:

    Sort by None, Site ID, Site Name, Domain, Site Path, Site URL
    Case Sensitive Sorting
    Keep the primary site at the top of the list

    Hi,

    Thank you for your reply.

    When I go to intall it, it says warning: the plugin hasn’t been tested for my version of WordPress.

    So unfortunately that will not work 🙁

    • This reply was modified 2 years, 12 months ago by wearecrunch.

    Hi again,

    Would it maybe make more sense if I just create a completely new child theme from the original files, and then copy the code from the files that have been changed in my modified theme into the new child theme?

    Would that be easier?

    I know it might take some time, but if it’s easier to just do that, then that is what I will do 🙂

    Thank you

    I actually just checked the two files if there were any differences, and apparently they are identical.

    So all the changes that have been made to the theme, has been made to the other core files.

    So What should I do in order to get the child theme to work even if the functions.php is identical to the child themes one.

    Thank you

    Thank you.

    But what do you mean?

    Where should I rename that function, I can’t find that piece of code in my functions.php file.

    So basically you are saying that I do not need the functions.php in the parent theme right?
    If I remove the call.

    Isn’t that the same as just removing the file from the parent theme.

    I will just post my functions.php code from both files, so maybe you are able to help with what I need to do.

    dogmawp_child:

    <?php
    // Enqueue Style
    require get_template_directory() . '/includes/style.php';
    // Enqueue JS
    require get_template_directory() . '/includes/js.php';
    // redux options
    require get_template_directory() . '/includes/sample-config.php';
    require get_template_directory() . '/includes/color.php';
    require get_template_directory() . '/includes/AfterSetupTheme.php';
    require get_template_directory() . '/includes/functions.php';
    require get_template_directory() . '/pagination.php';
    if ( ! isset( $content_width ) ) $content_width = 900;	
    
    $wr_options = get_option('wr_wp');
    if ($wr_options['social-menu']=="st2") {
    // register nav menu
    function dogma_register_menus() {
    register_nav_menus( array(
    'top-menu' => esc_attr__( 'Primary menu','dogmawp' ),
    'footer-menu' => esc_attr__( 'Footer menu','dogmawp' ),
    	)
    		);
    }
    add_action('init', 'dogma_register_menus');
    }
    else{
    // register nav menu
    function dogma_register_menus() {
    register_nav_menus( array(
    'top-menu' => esc_attr__( 'Primary menu','dogmawp' ),
    )
    		);
    }
    add_action('init', 'dogma_register_menus');
    }
    add_action( 'after_setup_theme', 'dogma_setup' );
    function dogma_setup() {
    // Theme Support
    	function dogma_editor_styles() {
        add_editor_style( 'style.css' );
    }
    	add_action( 'after_setup_theme', 'dogma_add_editor_styles' );
    	add_theme_support( 'automatic-feed-links' );
    	add_theme_support( 'custom-background' );
    	add_theme_support( 'custom-header' );
    	add_theme_support( "title-tag" );
    	add_theme_support( 'post-formats', array('image','video', 'gallery') );
    	add_post_type_support( 'portgallery', 'post-formats' );
    }
    // Word Limit
    	function dogma_string_limit_words($string, $word_limit)
    	{
    	$words = explode(' ', $string, ($word_limit + 1));
    	if(count($words) > $word_limit)
    	array_pop($words);
    	return implode(' ', $words);
    	}
    // Add post thumbnail functionality
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 559, 220, true ); // Normal post thumbnails
    	add_image_size( 'dg_portfolio_image', 683, 441, true ); // port Thumbnail
    	add_image_size( 'dg_blog_details_image', 1024, 661, true ); // port Thumbnail
    require(get_template_directory().'/symple-shortcodes/symple-shortcodes.php');
    // How comments are displayed
    function dogma_comment($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment;
        extract($args, EXTR_SKIP);
    if ( 'div' == $args['style'] ) {
          $tag = 'div';
          $add_below = 'comment';
        } else {
          $tag = 'li';
          $add_below = 'div-comment';
        }
    ?>
        <<?php echo balanceTags($tag); ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?>>
        <?php if ( 'div' != $args['style'] ) : ?>
    	<div id="div-comment-<?php comment_ID() ?>" class="comment-body">
        <?php endif; ?>
        <div class="comment-author">
        <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?>
        </div>
    	<cite class="fn"><?php printf(__('%s','dogmawp'), get_comment_author_link()) ?></cite>
    	 <div class="comment-meta">
           <h6><a href="#"><?php comment_date('F j, Y \a\t g:i a'); ?></a> / <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?></h6>
         </div>
         <?php comment_text() ?>
          <?php if ($comment->comment_approved == '0') : ?>
        <em class="comment-awaiting-moderation"><?php esc_attr_e('Your comment is awaiting moderation.','dogmawp') ?></em>
        <br />
       <?php endif; ?>
    <?php if ( 'div' != $args['style'] ) : ?>
        </div>
        <?php endif; ?>
    <?php
            }
    // create sidebar & widget area
    if(function_exists('register_sidebar')) {
    function dogma_theme_slug_widgets_init() {
        register_sidebar( array(
            'name' => esc_attr__( 'Blog Sidebar', 'dogmawp' ),
            'id' => 'sidebar-1',
            'description' => esc_attr__( 'This area for Blog widgets.', 'dogmawp' ),
            'before_widget' => '<div id="%1$s" class="widget grid-item-holder wr-widget-main %2$s"><article>',
    		'after_widget'  => '</article></div>',
    		'before_title'  => '<ul class="blog-title"><li>',
    		'after_title'   => '</li></ul>'
        ) );
    }
    add_action( 'widgets_init', 'dogma_theme_slug_widgets_init' );
    }
    /* Include Meta Box Framework */
    define( 'RWMB_URL', trailingslashit( get_template_directory_uri() . '/includes/metaboxes' ) );
    define( 'RWMB_DIR', trailingslashit( get_template_directory() . '/includes/metaboxes' ) );
    require_once RWMB_DIR . 'meta-box.php';
    include(get_template_directory().'/includes/metaboxes.php');
    if(function_exists('vc_set_as_theme')) vc_set_as_theme();
    // Initialising Shortcodes
    if (class_exists('WPBakeryVisualComposerAbstract')) {
      function requireVcExtend(){
        require_once get_template_directory() . '/extendvc/extend-vc.php';
      }
      add_action('init', 'requireVcExtend',2);
    }
    /*comme*/

    original dogmawp:

    <?php
    // Enqueue Style
    require get_template_directory() . '/includes/style.php';
    // Enqueue JS
    require get_template_directory() . '/includes/js.php';
    // redux options
    require get_template_directory() . '/includes/sample-config.php';
    require get_template_directory() . '/includes/color.php';
    require get_template_directory() . '/includes/AfterSetupTheme.php';
    require get_template_directory() . '/includes/functions.php';
    require get_template_directory() . '/pagination.php';
    if ( ! isset( $content_width ) ) $content_width = 900;	
    
    $wr_options = get_option('wr_wp');
    if ($wr_options['social-menu']=="st2") {
    // register nav menu
    function dogma_register_menus() {
    register_nav_menus( array(
    'top-menu' => esc_attr__( 'Primary menu','dogmawp' ),
    'footer-menu' => esc_attr__( 'Footer menu','dogmawp' ),
    	)
    		);
    }
    add_action('init', 'dogma_register_menus');
    }
    else{
    // register nav menu
    function dogma_register_menus() {
    register_nav_menus( array(
    'top-menu' => esc_attr__( 'Primary menu','dogmawp' ),
    )
    		);
    }
    add_action('init', 'dogma_register_menus');
    }
    add_action( 'after_setup_theme', 'dogma_setup' );
    function dogma_setup() {
    // Theme Support
    	function dogma_editor_styles() {
        add_editor_style( 'style.css' );
    }
    	add_action( 'after_setup_theme', 'dogma_add_editor_styles' );
    	add_theme_support( 'automatic-feed-links' );
    	add_theme_support( 'custom-background' );
    	add_theme_support( 'custom-header' );
    	add_theme_support( "title-tag" );
    	add_theme_support( 'post-formats', array('image','video', 'gallery') );
    	add_post_type_support( 'portgallery', 'post-formats' );
    }
    // Word Limit
    	function dogma_string_limit_words($string, $word_limit)
    	{
    	$words = explode(' ', $string, ($word_limit + 1));
    	if(count($words) > $word_limit)
    	array_pop($words);
    	return implode(' ', $words);
    	}
    // Add post thumbnail functionality
    	add_theme_support( 'post-thumbnails' );
    	set_post_thumbnail_size( 559, 220, true ); // Normal post thumbnails
    	add_image_size( 'dg_portfolio_image', 683, 441, true ); // port Thumbnail
    	add_image_size( 'dg_blog_details_image', 1024, 661, true ); // port Thumbnail
    require(get_template_directory().'/symple-shortcodes/symple-shortcodes.php');
    // How comments are displayed
    function dogma_comment($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment;
        extract($args, EXTR_SKIP);
    if ( 'div' == $args['style'] ) {
          $tag = 'div';
          $add_below = 'comment';
        } else {
          $tag = 'li';
          $add_below = 'div-comment';
        }
    ?>
        <<?php echo balanceTags($tag); ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?>>
        <?php if ( 'div' != $args['style'] ) : ?>
    	<div id="div-comment-<?php comment_ID() ?>" class="comment-body">
        <?php endif; ?>
        <div class="comment-author">
        <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?>
        </div>
    	<cite class="fn"><?php printf(__('%s','dogmawp'), get_comment_author_link()) ?></cite>
    	 <div class="comment-meta">
           <h6><a href="#"><?php comment_date('F j, Y \a\t g:i a'); ?></a> / <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?></h6>
         </div>
         <?php comment_text() ?>
          <?php if ($comment->comment_approved == '0') : ?>
        <em class="comment-awaiting-moderation"><?php esc_attr_e('Your comment is awaiting moderation.','dogmawp') ?></em>
        <br />
       <?php endif; ?>
    <?php if ( 'div' != $args['style'] ) : ?>
        </div>
        <?php endif; ?>
    <?php
            }
    // create sidebar & widget area
    if(function_exists('register_sidebar')) {
    function dogma_theme_slug_widgets_init() {
        register_sidebar( array(
            'name' => esc_attr__( 'Blog Sidebar', 'dogmawp' ),
            'id' => 'sidebar-1',
            'description' => esc_attr__( 'This area for Blog widgets.', 'dogmawp' ),
            'before_widget' => '<div id="%1$s" class="widget grid-item-holder wr-widget-main %2$s"><article>',
    		'after_widget'  => '</article></div>',
    		'before_title'  => '<ul class="blog-title"><li>',
    		'after_title'   => '</li></ul>'
        ) );
    }
    add_action( 'widgets_init', 'dogma_theme_slug_widgets_init' );
    }
    /* Include Meta Box Framework */
    define( 'RWMB_URL', trailingslashit( get_template_directory_uri() . '/includes/metaboxes' ) );
    define( 'RWMB_DIR', trailingslashit( get_template_directory() . '/includes/metaboxes' ) );
    require_once RWMB_DIR . 'meta-box.php';
    include(get_template_directory().'/includes/metaboxes.php');
    if(function_exists('vc_set_as_theme')) vc_set_as_theme();
    // Initialising Shortcodes
    if (class_exists('WPBakeryVisualComposerAbstract')) {
      function requireVcExtend(){
        require_once get_template_directory() . '/extendvc/extend-vc.php';
      }
      add_action('init', 'requireVcExtend',2);
    }
    /*comme*/

    Thank you

    Oh ok I think I understand now.

    So in short.

    What I have to do is to find out what is declared in both functions.php and then remove it from dogmawp_child so it will only be declared in dogmawp’s function.php

    Is that correct?

    Thank you so much for all your help.
    I really appreciate it.

    If you can confirm that I have understood it correct now, then I will start removing the declarations from the child theme that is already declared in the parent.

    Thank you

    Thank you for your reply.

    But how do I know what changes have been made to the original functions.php after an update?
    It shouldn’t be necessary to copy any code from the original file, as that is the file that should be using the original functions right?
    And the child theme would use all new functions that we have modified in the functions.php correct?

    So if I change the name of the folder dogmawp to dogmawp_child and copy in a clean brand new origanal dogmawp, then it would only be the child theme that has the modifications right?
    Just like it says in the tutorial I linked to before.

    So how would I know what has been changes in the original files, that is something that the developers behind the theme has done.

    I seemed pretty simple in the tutorial to convert a parent theme into a child theme, and it’s not giving me that error, but I just don’t know if it is working properly.

    Thank you.

    Yes i copied the whole dogmawp_child and dogmawp theme folders. Both of them including functions.php

    Well i also can’t create a child theme from scratch, because i have also done a lot of modications to all the files, not just the css. So i need to convert the already modified theme into a childtheme so it does not affect it when there is an update.

    It’s strange, because it does not give me this error locally.

    But ok, do i need to remove one of the fuctions.php files from the online version?
    And witch one?

    I assume it is the one from the origal files right?
    So then i can still modify the function.php in the childtheme.

    Is that correct, or what can i do?

    Thank you

    It seems like it is only when there is both Dogmawp and dogmawp_child in the themes folder.
    So something is wrong when both folders are there.

    But I have no idea what it could be.

    Now I did exactly the same thing as what I did locally, but it still gives me that error.
    Do you have any idea what that could mean?

    Thank you

    Ok, now something happened 🙁

    It was fine locally, so I tried to upload it to the server so I could share the link with you.
    I just uploaded the parent theme and the child theme from my local folder, so I thought it would also work online.

    But when I try to activate one of the other themes it gives me this error:

    Fatal error: Cannot redeclare dogma_setup() (previously declared in /home/www/wearecrunch.net/newsite/wp-content/themes/dogmawp_child/functions.php:39) in /home/www/wearecrunch.net/newsite/wp-content/themes/dogmawp/functions.php on line 49

    It shows up fine locally, but this is happening online 🙁 Have I overlooked something on the online version?

    Thank you 🙁

    Thank you very much for your replies.

    Rajan, Now I inserted template in the CSS, but I am still not sure that it is working.

    Andrew, That is what I wasn’t sure of, I didn’t understand what I had to change in the style.css
    I thought it was correct, but now I added template, is there more that I am missing?

    And how would I be able to check if it is working properly?

    Thank you

    Now my CSS looks like this:

    /*Theme Name: DogmaWP child
    Theme URI: http://themeforest.net/themes/dogmawp
    Description: A Dogma  Creative Responsive Architecture Theme is perfect if you like a clean and modern design. This template is ideal for architects, furniture designers, photographers, and those who need an easy, attractive and effective way to share their work with clients..
    Version: 1.1
    Author: webRedox WordPress team
    Author URI: http://www.webredox.net
    Template: dogmawp
    License:
    License URI:
    Tags: two-columns, fluid-layout, custom-background, custom-colors, featured-images, theme-options
    */
    
    .wp-caption{}
    .wp-caption-text{}
    .sticky{}
    .gallery-caption{}
    .bypostauthor{}
    .alignright{}
    .alignleft{}
    .aligncenter{}
    
    .alignleft,
    img.alignleft {
        float: left;
        margin-right: 20px;
        margin-bottom: 20px;
    }
    .alignright,
    img.alignright {
        display: block;
        float: right;
        margin-left: 20px;
        margin-bottom: 20px;
    }
    .aligncenter,
    img.aligncenter {
        margin-left: auto;
        margin-right: auto;
        display: block;
        clear: both;
        margin-bottom: 20px;
    }
    .screen-reader-text {
    
    }
    
    .screen-reader-text:focus {
    
    }

    Oh ok thank you very much.

    There aren’t already sidebars on the single post pages unfortunately 🙁

    Do you also have a plugin that can create a sidebar widget for the single post page.

    Thank you

Viewing 15 replies - 16 through 30 (of 30 total)