celineweyermann
Forum Replies Created
-
its for the website https://www.batimo.ch/team
Please adivce!- This reply was modified 3 years, 1 month ago by celineweyermann.
So i tried it over our ftp server (data manager from the hoster) and as well with wp-database plugin – See attached files it does not work.
It even did not work – it also shows up the added code in the header of the whole site.
cause this is inacceptable i needed to delete again your code. but see here the screenshots i made:https://new.batimo.ch/wp-content/uploads/2019/05/Tried_PHP_File.png
and
https://new.batimo.ch/wp-content/uploads/2019/05/Header_Batimo.pngPlease contact me by DM so i can give you access to wp dasboard and ftp!
WE ARE NOW STRUGGLING SINCE OVER A WEEK AND I BOUGHT PREMIUM SUPPORT BUT I DO NOT GET ANY HELPFUL ADVICE ALL WE DID DID NOT SOLVE THE ISSUE!@kbatdorf Unfortunately i tried to deactivate multiple plugins and tried my best but i do not find a solution – can you please contact me by direct message so i can provide you access to the wp-dashboard and to our ftp server?
Thanks and best regardsI tried both with and withouth the return
See here scrennshot of acutal added code:https://new.batimo.ch/wp-content/uploads/2019/05/tempsnip.png
You can now also see i edit the right theme.
Furher i send you here screenshots of the whole function php file if you want to check if anything is wrong:
_______________________________________________________________________
<?php
/**Theme Name : Quality-Pro
* Theme Core Functions and Codes
*/
/**Includes reqired resources here**/
define(‘WEBRITI_TEMPLATE_DIR_URI’,get_template_directory_uri());
define(‘WEBRITI_TEMPLATE_DIR’,get_template_directory());
define(‘WEBRITI_THEME_FUNCTIONS_PATH’,WEBRITI_TEMPLATE_DIR.’/functions’);
define(‘WEBRITI_THEME_OPTIONS_PATH’,WEBRITI_TEMPLATE_DIR_URI.’/functions/theme_options’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/menu/default_menu_walker.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/menu/webriti_nav_walker.php’);
require_once(‘theme_setup_data.php’);
require_once( WEBRITI_THEME_FUNCTIONS_PATH . ‘/scripts/scripts.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/post-type/custom-post-type.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/meta-box/post-meta.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/taxonomies/taxonomies.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/excerpt/excerpt.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/commentbox/comment-function.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/widget/custom-sidebar.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/font/font.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/breadcrumbs/breadcrumbs.php’);require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/wpml-pll/functions.php’ );
//Customizer
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-callout.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-client.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-service.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-funfact.php’ );
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-slider.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-copyright.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-home.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-project.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-testimonial.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-template.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-layout.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-typography.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-blog.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-team.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-shop.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-footer-info.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer.php’ );require( WEBRITI_TEMPLATE_DIR . ‘/css/custom-light.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/template-tags.php’);// Sidebar Widgets
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/widget/webriti-sidebar-latest-post.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/widget/webriti-header-topbar-info-widget.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/widget/webriti-social-icon.php’);//Footer Widgets
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/widget/webriti-footer-contact-widgets.php’);
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/pagination/webriti_pagination.php’);//Alpha Color Control
require( WEBRITI_THEME_FUNCTIONS_PATH . ‘/customizer/customizer-alpha-color-picker/class-quality-customize-alpha-color-control.php’);//content width
if ( ! isset( $content_width ) ) $content_width = 700;//In PX
//wp title tag starts here
function webriti_head( $title, $sep )
{ global $paged, $page;
if ( is_feed() )
return $title;
// Add the site name.
$title .= get_bloginfo( ‘name’ );
// Add the site description for the home/front page.
$site_description = get_bloginfo( ‘description’ );
if ( $site_description && ( is_home() || is_front_page() ) )
$title = “$title $sep $site_description”;
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title = “$title $sep ” . sprintf( _e( ‘Page’, ‘quality’ ), max( $paged, $page ) );
return $title;
}
add_filter( ‘wp_title’, ‘webriti_head’, 10, 2);add_action( ‘after_setup_theme’, ‘webriti_setup’ );
function webriti_setup()
{ // Load text domain for translation-ready
load_theme_textdomain( ‘quality’, WEBRITI_THEME_FUNCTIONS_PATH . ‘/lang’ );add_theme_support( ‘post-thumbnails’ ); //supports featured image
// This theme uses wp_nav_menu() in one location.
register_nav_menu( ‘primary’, __( ‘Primary Menu’, ‘quality’ ) ); //Navigation$args = array(‘default-color’ => ‘000000’,);
add_theme_support( ‘custom-background’, $args );
add_theme_support( ‘automatic-feed-links’);
add_theme_support( ‘title-tag’ );// woocommerce support
add_theme_support( ‘woocommerce’ );// Woocommerce Gallery Support
add_theme_support( ‘wc-product-gallery-zoom’ );
add_theme_support( ‘wc-product-gallery-lightbox’ );
add_theme_support( ‘wc-product-gallery-slider’ );
}
// Read more tag to formatting in blog page
function quality_new_content_more($more)
{ global $post;
return ‘<p>ID}\” class=\”more-link\”>” .__(‘Read More’,’quality’).”</p>”;
}
add_filter( ‘the_content_more_link’, ‘quality_new_content_more’ );
// custom background
function custom_background_function()
{
$quality_pro_options=theme_data_setup();
$current_options = wp_parse_args( get_option( ‘quality_pro_options’, array() ), $quality_pro_options );
$page_bg_image_url = $current_options[‘back_image’];
if($page_bg_image_url!=”)
{
echo ‘<style>body.boxed{ background-image:url(“‘.WEBRITI_TEMPLATE_DIR_URI.’/images/bg-patterns/’.$page_bg_image_url.'”);}</style>’;
}
}
add_action(‘wp_head’,’custom_background_function’,10,0);if(get_option(‘quality_pro_options’)!=”){
$status = get_option(‘quality-migration-status’,’no’);
if($status == ‘no’){
$old_theme_project = get_option(‘quality_pro_options’);
if(isset($old_theme_project[‘project_one_title’])){
$post_id = wp_insert_post(
array (
‘post_type’ => ‘quality_portfolio’,
‘post_title’ => $old_theme_project[‘project_one_title’],
‘post_status’ => ‘publish’,
));$filename = $old_theme_project[‘project_one_thumb’];
$filetype = wp_check_filetype( basename( $filename ), null );
$wp_upload_dir = wp_upload_dir();
$attachment = array(
‘guid’ => $wp_upload_dir[‘url’] . ‘/’ . basename( $filename ),
‘post_mime_type’ => $filetype[‘type’],
‘post_title’ => preg_replace( ‘/\.[^.]+$/’, ”, basename( $filename ) ),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);$attach_id = wp_insert_attachment( $attachment, $filename, $post_id );
set_post_thumbnail( $post_id, $attach_id );$table_name = $wpdb->prefix . “term_relationships”;
$wpdb->insert($table_name, array(‘object_id’ => $post_id, ‘term_taxonomy_id’ => 2 ,’term_order’ => 0) );
}
if(isset($old_theme_project[‘project_two_title’])){
$post_id = wp_insert_post(
array (
‘post_type’ => ‘quality_portfolio’,
‘post_title’ => $old_theme_project[‘project_two_title’],
‘post_status’ => ‘publish’,
));
$filename = $old_theme_project[‘project_two_thumb’];
$filetype = wp_check_filetype( basename( $filename ), null );
$wp_upload_dir = wp_upload_dir();
$attachment = array(
‘guid’ => $wp_upload_dir[‘url’] . ‘/’ . basename( $filename ),
‘post_mime_type’ => $filetype[‘type’],
‘post_title’ => preg_replace( ‘/\.[^.]+$/’, ”, basename( $filename ) ),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);
$attach_id = wp_insert_attachment( $attachment, $filename, $post_id );
set_post_thumbnail( $post_id, $attach_id );$table_name = $wpdb->prefix . “term_relationships”;
$wpdb->insert($table_name, array(‘object_id’ => $post_id, ‘term_taxonomy_id’ => 2 ,’term_order’ => 0) );
}
if(isset($old_theme_project[‘project_three_title’])){
$post_id = wp_insert_post(
array (
‘post_type’ => ‘quality_portfolio’,
‘post_title’ => $old_theme_project[‘project_three_title’],
‘post_status’ => ‘publish’,
));
$filename = $old_theme_project[‘project_three_thumb’];
$filetype = wp_check_filetype( basename( $filename ), null );
$wp_upload_dir = wp_upload_dir();
$attachment = array(
‘guid’ => $wp_upload_dir[‘url’] . ‘/’ . basename( $filename ),
‘post_mime_type’ => $filetype[‘type’],
‘post_title’ => preg_replace( ‘/\.[^.]+$/’, ”, basename( $filename ) ),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);
$attach_id = wp_insert_attachment( $attachment, $filename, $post_id );
set_post_thumbnail( $post_id, $attach_id );$table_name = $wpdb->prefix . “term_relationships”;
$wpdb->insert($table_name, array(‘object_id’ => $post_id, ‘term_taxonomy_id’ => 2 ,’term_order’ => 0) );
}
if(isset($old_theme_project[‘project_four_title’])){
$post_id = wp_insert_post(
array (
‘post_type’ => ‘quality_portfolio’,
‘post_title’ => $old_theme_project[‘project_four_title’],
‘post_status’ => ‘publish’,
));
$filename = $old_theme_project[‘project_four_thumb’];
$filetype = wp_check_filetype( basename( $filename ), null );
$wp_upload_dir = wp_upload_dir();
$attachment = array(
‘guid’ => $wp_upload_dir[‘url’] . ‘/’ . basename( $filename ),
‘post_mime_type’ => $filetype[‘type’],
‘post_title’ => preg_replace( ‘/\.[^.]+$/’, ”, basename( $filename ) ),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);
$attach_id = wp_insert_attachment( $attachment, $filename, $post_id );
set_post_thumbnail( $post_id, $attach_id );$table_name = $wpdb->prefix . “term_relationships”;
$wpdb->insert($table_name, array(‘object_id’ => $post_id, ‘term_taxonomy_id’ => 2 ,’term_order’ => 0) );
}
if(isset($old_theme_project[‘project_five_title’])){
$post_id = wp_insert_post(
array (
‘post_type’ => ‘quality_portfolio’,
‘post_title’ => $old_theme_project[‘project_five_title’],
‘post_status’ => ‘publish’,
));
$filename = $old_theme_project[‘project_five_thumb’];
$filetype = wp_check_filetype( basename( $filename ), null );
$wp_upload_dir = wp_upload_dir();
$attachment = array(
‘guid’ => $wp_upload_dir[‘url’] . ‘/’ . basename( $filename ),
‘post_mime_type’ => $filetype[‘type’],
‘post_title’ => preg_replace( ‘/\.[^.]+$/’, ”, basename( $filename ) ),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);
$attach_id = wp_insert_attachment( $attachment, $filename, $post_id );
set_post_thumbnail( $post_id, $attach_id );$table_name = $wpdb->prefix . “term_relationships”;
$wpdb->insert($table_name, array(‘object_id’ => $post_id, ‘term_taxonomy_id’ => 2 ,’term_order’ => 0) );
}
update_option(‘quality-migration-status’,’yes’);
}
}add_action( ‘after_switch_theme’, ‘quality_import_theme_mods_from_spicethemes_child_themes’ );
function quality_import_theme_mods_from_spicethemes_child_themes() {
// Get the name of the previously active theme.
$previous_theme = strtolower( get_option( ‘theme_switched’ ) );if ( ! in_array(
$previous_theme, array(
‘quality-blue’,
‘quality-green’,
‘quality-orange’,
‘mazino’,
)
) ) {
return;
}// Get the theme mods from the previous theme.
$previous_theme_content = get_option( ‘theme_mods_’ . $previous_theme );if ( ! empty( $previous_theme_content ) ) {
foreach ( $previous_theme_content as $previous_theme_mod_k => $previous_theme_mod_v ) {
set_theme_mod( $previous_theme_mod_k, $previous_theme_mod_v );
}
}
}/*
* Import customizer options from Lite version
*/
add_action( ‘after_switch_theme’, ‘quality_get_lite_options’ );/**
* Import lite options.
*/function quality_get_lite_options() {
$quality_mods = get_option( ‘theme_mods_quality’ );
if ( ! empty( $quality_mods ) ) {
foreach ( $quality_mods as $quality_mods_k => $quality_mods_v ) {
set_theme_mod( $quality_mods_k, $quality_mods_v );
}
}
}
add_filter(‘metaslider_flex_slider_parameters’, function ($options) {
$options[‘start’] = isset($options[‘start’]) ? $options[‘start’] : array();
$options[‘start’] = array_merge($options[‘start’], array(”
window.jQuery(window).trigger(‘resize’);
“));
return [];
});
______________________________________________________Thanks for your help
See screenshot in this Link:
https://new.batimo.ch/wp-content/uploads/2019/05/Unbenannt.png
@kbatdorf
Can i provide you access to my wp dashboard? I just rechecked and it is in the right theme…
Plese send me direct message so I can provide you the login credentialsI added it in the Theme Editor > Functions.php file in the last lines of the code.
sorry i activated the coming soon mode to try out some stuff in the code.
now it is visible again if you want to check.unfortunately did not change anything.
Still the same problem.Its windows 7 with edge.
may you have additional advice?every time at clients computer.
when they resize the window it is fixed, BUT they want to have it solved, otherwise we can not be sure it does not happen at website visitors too.
Thanks for you help