http://www.gscgambia.com/gsc_ask_questions/
http://www.gscgambia.com/gsc_questions/
I have read a lot of articles but not one is working or it go’s behind my knowledge.
The layout takes the whole page instead a part of it.
What can i do to solve this and where can i manage the laoyt?
Many regards,
Peter
This is in your information:
This is the page.php form mine site:
global $sidebar;
$sidebar = get_post_meta($post->ID,’page-option-sidebar-template’,true);
$sidebar_array = gdl_get_sidebar_size( $sidebar );
if( $sidebar == ‘no-sidebar’ ){
get_template_part(‘page’, ‘full’);
}else{
get_template_part(‘page’, ‘normal’);
}
?>
What should i wright in content-start-wrapper.php?
Dear @Peter,
Please find here for the document guide on how to integrate the style of your DWQA plugin pages
:
Best regards,
It is the answer i have seen before. But ok. I will try again. Many regards, Peter
Hi @Peter,
You need to find the content wrapper of your theme which will be in your theme folder in a file: Single.php/Page.php
You would have to replicate the content wrapper into your content-start-wrapper.php file. i.e. how your theme would be handling the header, article and entry content div’s and the sidebar
This is the only i can find and is is in header.php
$sidebar = get_post_meta($post->ID,’post-option-sidebar-template’,true);
if( empty($sidebar) ){
global $default_post_sidebar;
$sidebar = $default_post_sidebar;
}
$sidebar_array = gdl_get_sidebar_size( $sidebar );
// Translator words
if( $gdl_admin_translator == ‘enable’ ){
$translator_about_author = get_option(THEME_SHORT_NAME.’_translator_about_author’, ‘About the Author’);
$translator_social_share = get_option(THEME_SHORT_NAME.’_translator_social_shares’, ‘Social Share’);
}else{
$translator_about_author = __(‘About the Author’,’gdl_front_end’);
$translator_social_share = __(‘Social Share’,’gdl_front_end’);
}
?>
global $left_sidebar, $right_sidebar, $default_post_left_sidebar, $default_post_right_sidebar;
$left_sidebar = get_post_meta( $post->ID , “post-option-choose-left-sidebar”, true);
$right_sidebar = get_post_meta( $post->ID , “post-option-choose-right-sidebar”, true);
if( empty( $left_sidebar )){ $left_sidebar = $default_post_left_sidebar; }
if( empty( $right_sidebar )){ $right_sidebar = $default_post_right_sidebar; }
global $blog_single_size, $sidebar_type;
$item_size = $blog_single_size[$sidebar_type];
// starting the content
echo ‘
echo ‘
“; // gdl-page-left
get_sidebar(‘right’);
echo ‘
‘;
echo “
“; // row
?>
Hi Peter
Please place the code below in your content-start-wrapper.php file
$sidebar = get_post_meta($post->ID,’post-option-sidebar-template’,true);
if( empty($sidebar) ){
global $default_post_sidebar;
$sidebar = $default_post_sidebar;
}
$sidebar_array = gdl_get_sidebar_size( $sidebar );
// Translator words
if( $gdl_admin_translator == ‘enable’ ){
$translator_about_author = get_option(THEME_SHORT_NAME.’_translator_about_author’, ‘About the Author’);
$translator_social_share = get_option(THEME_SHORT_NAME.’_translator_social_shares’, ‘Social Share’);
}else{
$translator_about_author = __(‘About the Author’,’gdl_front_end’);
$translator_social_share = __(‘Social Share’,’gdl_front_end’);
}
?>
global $left_sidebar, $right_sidebar, $default_post_left_sidebar, $default_post_right_sidebar;
$left_sidebar = get_post_meta( $post->ID , “post-option-choose-left-sidebar”, true);
$right_sidebar = get_post_meta( $post->ID , “post-option-choose-right-sidebar”, true);
if( empty( $left_sidebar )){ $left_sidebar = $default_post_left_sidebar; }
if( empty( $right_sidebar )){ $right_sidebar = $default_post_right_sidebar; }
global $blog_single_size, $sidebar_type;
$item_size = $blog_single_size[$sidebar_type];
// starting the content
echo ‘
echo ‘
“; // row
echo “
“; // gdl-page-left
get_sidebar(‘right’);
echo ‘
‘;
echo “
“; // row
?>
—————————
And advise if its working for you|
The only thing now is different error messages.
On the top of my page:
/* load style for DW Q&A plugin */ if( !function_exists(‘dwqa_tourpackage-v1-02_scripts’) ){ function dwqa_tourpackage-v1-02_scripts(){ wp_enqueue_style( ‘dw-tourpackage-v1-02-qa’, get_stylesheet_directory_uri() . ‘/dwqa-templates/style.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘dwqa_tourpackage-v1-02_scripts’ ); }
On the Question page:
Parse error: syntax error, unexpected T_DEC in /usr/local/www/prostorage/kegelspeter815/gscgambiacom/wp-content/themes/tourpackage-v1-02/dwqa-templates/content-start-wrapper.php on line 69
But. It is ok. I think it will not work with my theme. I have to look for another solution and delete this plugin.
Your service was very well and if i need another template, it will be one of yours.
Many regards,
Peter
Did you create the style.css file as per the documentation?
http://cmspioneer.com/designwall/guide/dw-question-answer-plugin/#Style_integration
Please add: ?> to the end of your content-start-wrapper.php file and see.
And please add
Done.
This is the code i put in my function.php file:
/* load style for DW Q&A plugin */
if( !function_exists(‘dwqa_tourpackage-v1-02_scripts’) ){
function dwqa_tourpackage-v1-02-scripts(){
wp_enqueue_style( ‘dw-tourpackage-v1-02-qa’, get_stylesheet_directory_uri() . ‘/dwqa-templates/style.css’ );
}
add_action( ‘wp_enqueue_scripts’, ‘dwqa_tourpackage-v1-02_scripts’ );
}
where ‘tourpackage-v1-02’ is the name of the direcotry of the theme.
And this is the error message i have on the top of all my pages:
/* load style for DW Q&A plugin */ if( !function_exists(‘dwqa_tourpackage_scripts’) ){ function dwqa_tourpackage-scripts(){ wp_enqueue_style( ‘dw-tourpackage-qa’, get_stylesheet_directory_uri() . ‘/dwqa-templates/style.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘dwqa_tourpackage_scripts’ ); }
Also the code you added to your functions.php file needs to be with the php start and end tags
/* load style for DW Q&A plugin */ if( !function_exists(‘dwqa_tourpackage_scripts’) ){ function dwqa_tourpackage-scripts(){ wp_enqueue_style( ‘dw-tourpackage-qa’, get_stylesheet_directory_uri() . ‘/dwqa-templates/style.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘dwqa_tourpackage_scripts’ ); }
?>
I did it. But now i cannot enter my site agian.
This is what i see ont the whole screen:
Parse error: syntax error, unexpected ‘-‘, expecting ‘(‘ in /usr/local/www/prostorage/kegelspeter815/gscgambiacom/wp-content/themes/tourpackage-v1-02/functions.php on line 162
This is to dangerous. I have working for 4 months on the site and i am very afraid now that this plugin will crash it all. To difficult for me. Your service is really good. But sorry. I need to find another solution.
Many thanks. Peter
I hope to find out all the changes and restore them back to the originals.
There is ‘-‘ instead of ‘_’ so use the following
/* load style for DW Q&A plugin */ if( !function_exists(‘dwqa_tourpackage_scripts’) ){ function dwqa_tourpackage_scripts(){ wp_enqueue_style( ‘dw-tourpackage-qa’, get_stylesheet_directory_uri() . ‘/dwqa-templates/style.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘dwqa_tourpackage_scripts’ ); }
?>
Also kindly remove the following from your content-start-wrapper.php
get_sidebar(‘left’);
echo ‘
‘;
echo ““; // row
echo ““; // gdl-page-left
get_sidebar(‘right’);
echo ‘
‘;
echo ““; // row
and place it within the content-end-wrapper.php file
For the file not found errors, try re-saving your permanent links!
That code was already in the content-end-wrapper.php file
Ok. It is working. The only thing now is that i have everyware the author information and a Post reply function. Things i need only on those posts i like to have it.
Take a look to your plugin:
http://www.gscgambia.com/gsc_questions/
http://www.gscgambia.com/gsc_ask_questions/
The visitors will fill in many times the wrong box.
Can we remove that?
Sure,
Simply remove the following from your content-end-wrapper.php file
// About Author
if(get_post_meta($post->ID, ‘post-option-author-info-enabled’, true) != “No”){
echo “
“;
}
// Include Social Shares
if(get_post_meta($post->ID, ‘post-option-social-enabled’, true) != “No”){
echo “
” . $translator_social_share . ‘
‘;
include_social_shares();
echo “
“;
}
echo ‘
comments_template();
echo ‘
‘;
I think it will work. That is part of your blog plugins, you will have to disable the comment plugin, I would leave it as it is
Take a look at:
Ok. Thx. Case Closed? Thanks for the great support.
But what left are the sidebars. They will not appear.
Hello Peter !
To display the sidebar in the Question page, Please send me the code that you added to the 2 file: content-start-wrapper.php / content-end-wrapper.php.
I have only -Standard template- there
Please login or Register to submit your answer
comments_template();
echo ‘