Forum Replies Created
-
AuthorPosts
-
tkabeMember
Sakin,
I fixed the WP errors. I have this remaining question regarding your instructions:
I have a child theme active for this project. To copy the catch-Everest/style.css to catch-everest-pro/styles.css as you suggest would not be correct. Won’t I need to create a child theme based upon the catch-everest-pro/ theme and then copy the styles.css, and modified additional files such as functions.php, header.php, footer.php and from the catch-everest-child/ theme to the catch-everest-pro-child? theme?Todd
tkabeMemberUpdate:
I had not selected the catch-everest-pro them in WP-Appreance-Themes when the the error messages previously posted were received. Copying the catch-everest-child/styles.css to a directory catch-everest-pro that was not the active theme should not have caused these errors in my opinion.
I do not understand the instructions you provided now that I think more carefully about what you recommended. I have a child theme active for this project. To copy the catch-Everest/style.css to catch-everest-pro/styles.css would not be correct. Won’t I need to create a child theme based upon the catch-everest-pro/ theme and then copy the styles.css and from the catch-everest-child/ theme to the catch-everest-pro-child? theme?
This upgrade would seem to be more complicated by the fact that I also have modified additional files such as functions.php, header.php, footer.php in my previous child theme. Wouldn’t all these would need to be rebuilt or copied to the new child theme?
tkabeMemberSakin,
I used the WP editor to select the Pro theme.
I did not see an “import” function in the WP editor so I copied the file style.css from the child theme to the new pro theme directory using FTP app.
When I tried to access the site from another browser tab – only a few pages are accessible. When I try to use the WP editor it can’t find files and I get an error ” The requested theme does not exist”.
This blew up Word Press and the site is down.
This is the error I get when trying to view themes from the WP dashboard “Warning: implode() [function.implode]: Invalid arguments passed in /home/content/44/10651744/html/wp-includes/class-wp-theme.php on line 675”
“ERROR: The theme directory “twentyfourteen” does not exist.”
When I try to access themes from the WP Dashboard non of the previously installed themes are visible – No child theme, no free theme and no Pro theme.
So what did miss in the instructions?
Todd
tkabeMemberSakin,
I uploaded and installed the zip file in my wp-admin themes section.
When I preview the Pro theme – it appears the preview might not include the existing child theme customizations. Please confirm if preview includes or excludes the child theme customizations.
If I activate the Pro version – will the existing child theme work with the Pro version? Currently the Pro preview of the site is missing much of our customizations made in the child theme.
Todd
tkabeMemberOur goal is to add a fundraiser logo to the header image as shown below. This logo would link to the fundraiser page as shown in the previous test/sample page.
http://calprogramsautistic.org/wp-content/uploads/2014/03/copy-CPA_header_fundraiser.jpg
tkabeMemberI uploaded the new modified code you provided in the GitHub Branch and got a different error code –
Parse error: syntax error, unexpected T_FUNCTION in /home/content/44/10651744/html/wp-content/themes/catch-everest-child/functions.php on line 8I appreciate your generous assistance, however after carefully rebuilding the functions.php file both the mobile gestures and removal of “Permalink To” are working. I would consider this issue closed. Thank you very much for providing excellent support!
Here are my steps I performed to fix the file.
1. Restored functions.php from a recent backup.
2. Tested this file – working ok.
3. This time I added the mobile gestures code to functions.php first before any other new code. I used the editor in WP and updated the file – successfully.
4. Refreshed the server – deactivated webclips in theme options.
5. tested gestures on mobile successfully.
6. Added the code to remove “Permalink To” into the functions.php file using WP editor and updated the file – successfully.
7. Refreshed the server – activated webclips in theme options.
8. Test in homepage slider – successfully.tkabeMemberSorry Sakin, I am not clear where you put the changes. I looked in my GitHub and at the file itself and did not see your post.
I understand the correct system file name is on “functions”.php I created this name simply to keep this file from conflicting with any saved original or child theme file on your end or my end.
tkabeMemberSakin – the file cpa_child_functions.php a copy of the functions.php file may be found here – https://github.com/tkabe/GitHub_code_help
Thank you for your review.
tkabeMemberI am working on sharing the file in GitHub shortly.
tkabeMemberI searched the file using notepad ++ and the WP editor and could not find an error in line 98.
Adding the PHP code for the remove “Permalink To” at first allowed the server refresh as you described using theme options however now this fails and causes the error described.
I had to upload the functions.php from a backup to get the site back up.
tkabeMemberI get this error
>>Parse error: syntax error, unexpected ‘<‘ in /home/content/44/10651744/html/wp-content/themes/catch-everest-child/functions.php on line 98<<after adding the mobile swipe and the remove “Permalink To” php code you provided to functions.php code posted below.
child theme functions.php
<?php/** CPA Customization
* Unassociated – discover what this is related to
*
* @uses catcheverest_header action to add it in the header
*/
function register_my_menus() {
register_nav_menus(
array(
‘primary’ => __( ‘Profile Menu’ ),
‘sidebar-menu’ => __( ‘Sidebar Menu’ )
)
);
}
add_action( ‘init’, ‘register_my_menus’ );function image_tag($html, $id, $alt, $title) {
return preg_replace(array(
‘/’.str_replace(‘//’,’//’,get_bloginfo(‘url’)).’/i’,
‘/s+width=”d+”/i’,
‘/s+height=”d+”/i’,
‘/alt=””/i’
),
array(
”,
”,
”,
‘alt=”‘ . $title . ‘”‘
),
$html);
}
add_filter(‘get_image_tag’, ‘image_tag’, 0, 4);/** CPA Customization
* Shows Featured Post Slider
*
* @uses catcheverest_header action to add it in the header
*/
function catcheverest_post_sliders() {
//delete_transient( ‘catcheverest_post_sliders’ );global $post, $catcheverest_options_settings;
$options = $catcheverest_options_settings;if( ( !$catcheverest_post_sliders = get_transient( ‘catcheverest_post_sliders’ ) ) && !empty( $options[ ‘featured_slider’ ] ) ) {
echo ‘<!– refreshing cache –>’;$catcheverest_post_sliders = ‘
<div id=”main-slider” class=”container”>
<section class=”featured-slider”>’;
$get_featured_posts = new WP_Query( array(
‘posts_per_page’ => $options[ ‘slider_qty’ ],
‘post__in’ => $options[ ‘featured_slider’ ],
‘orderby’ => ‘post__in’,
‘ignore_sticky_posts’ => 1 // ignore sticky posts
));
$i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++;
$title_attribute = apply_filters( ‘the_title’, get_the_title( $post->ID ) );
$excerpt = get_the_excerpt();
if ( $i == 1 ) { $classes = “post hentry slides displayblock”; } else { $classes = “post hentry slides displaynone”; }
$catcheverest_post_sliders .= ‘
<article class=”‘.$classes.'”>
<figure class=”slider-image”>
‘. get_the_post_thumbnail( $post->ID, ‘slider’, array( ‘title’ => esc_attr( $title_attribute ), ‘alt’ => esc_attr( $title_attribute ), ‘class’ => ‘pngfix’ ) ).’
</figure>
<div class=”entry-container”>
<header class=”entry-header”>
<h1 class=”entry-title”>
‘.the_title( ‘<span>’,'</span>’, false ).’
</h1>
</header>’;
if( $excerpt !=”) {
$catcheverest_post_sliders .= ‘<div class=”entry-content”>’. $excerpt.'</div>’;
}
$catcheverest_post_sliders .= ‘
</div>
</article><!– .slides –>’;
endwhile; wp_reset_query();
$catcheverest_post_sliders .= ‘
</section>
<div id=”slider-nav”>
<
>
</div>
<div id=”controllers”></div>
</div><!– #main-slider –>’;set_transient( ‘catcheverest_post_sliders’, $catcheverest_post_sliders, 86940 );
}
echo $catcheverest_post_sliders;
}/** CPA Customization
* Allow Mobile swip/gestures
*
* @uses catcheverest_header action to add it in the header
*/
function unhook_catcheverest_functions() {
remove_action( ‘wp_head’, ‘catcheverest_responsive’, 5 );
}
add_action( ‘init’, ‘unhook_catcheverest_functions’ );//Responsive Meta in Child Theme
function catcheverest_child_responsive() {
// Getting data from Theme Options
global $catcheverest_options_settings;
$options = $catcheverest_options_settings;
$disable_responsive = $options[ ‘disable_responsive’ ];if ( $disable_responsive == “0” ) {
echo ‘<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>’;
}
}
add_action( ‘wp_head’, ‘catcheverest_child_responsive’, 5 );?>
tkabeMemberVery cool Sakin! This worked great. I was suspecting something server side needed to be update, but lacked an understanding how to refresh.
tkabeMemberTheme Footer has been restored as described in earlier post. I do understand.
I do not understand your message about the featured post slider. Are you suggesting I copy the code you provided and add/insert this into my existing child theme functions.php then edit this code removing the two (2) tag references to “Permalink to”? I did this and it did not work so I must not be clear about your instructions.
tkabeMemberThanks, that fixed the issue. This code was part of an earlier page edit completed before my time on the site that should have been removed. Proves CSS comments are invaluable!
tkabeMemberSakin – researched upgrade and features on Pro Theme – waiting for approval to upgrade. Thanks for the clarification.
-
AuthorPosts