JamesWord2016
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptRamesh, the file you are referring to is the one I edited when my whole page crashed and even wordpress stopped working after just a simple code add. I just have to accept that this problem is beyond me and learn that I should never buy a script from a developer who offers no support and doesn’t answer e-mails.
I wasn’t aware that the whole Appearance Customize section in the theme is not functional when I bought it as that’s what I expected to utilize. It’s not actually a part of the theme even. The developer is probably laughing reading this thread as we speak.
Anyway, do you know anyone who offers paid services and can help me with this?
I appreciate your effort but it’s just not possible. I don’t understand how the whole page can crash after just editing some commas, or how to insert the code you showed me properly. Lesson learnt. I should’ve read PHP for dummies before even switching to worpdress, lol. Was swayed by everyone saying how easy it is.
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptok, after re-uploading a backup of the file in FTP I was able to get site up and running again but back to square one now. At least wordpress is working again.
Can you guys recommend someone I can hire to solve this issue?
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptmy site is haraldbaldr DOT com
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptHey, so I was experimenting with PHP editing and now my whole site is down. I cannot even access wordpress and my site won’t load. I just get this message on the screen:
Parse Error Syntax Error, unexpected if:
How do I solve this if I can’t even log in to wordpress and install theme again?
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptI even tried removing the whole mamontov_post_thumb code from the text below and updated. The images were still there.
( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php echo mamontov_post_thumb($post->ID); ?> <div class='inside-post-wrap'>
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptthecodeisclear, thank you for replying. I feel a solution may be in reach. I tried many varieties of your code:
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php echo mamontov_post_thumb($post->ID) if (is_home() || is_front_page()) { return null; }; ?> <div class='inside-post-wrap'>
and
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php echo mamontov_post_thumb($post->ID); ?> if (is_home() || is_front_page()) { return null; } <div class='inside-post-wrap'> <?php if(!is_front_page()) { ?>
and this
<?php echo mamontov_post_thumb if (is_home() || is_front_page()) { return null; } ($post->ID); ?> <div class='inside-post-wrap'> <?php if(!is_front_page()) { ?>
But the pictures still remain and nothing changes. Of course this is some ridiculous mistake I’m making but I just don’t see it. Could it be this is the wrong PHP file? or am I using the code you gave me the wrong way?
Again thanks for helping me.
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptUnder page PHP there is something I thought might help so I removed the whole 4th line but it didn’t have any effect.
<?php get_header(); ?> <div class='posts page'> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php echo mamontov_post_thumb($post->ID); ?> <div class='inside-post-wrap'> <?php if(!is_front_page()) { ?> <h2 class='post-title'> <?php the_title(); ?> </h2>
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptDo you think this is it? Is there a small thing I can take off int hat code which would make script still work? I’m so afraid to modify things lest I destroy everything. Been working on this nonstop for a week now.
// Post thumbnail generator function mamontov_post_thumb($id, $size='preview') { $post_custom_thumb = get_post_meta($id, 'video_thumb', true); if(!$post_custom_thumb) { if(is_singular()) { $post_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'main'); $imgsize = 'main'; } else { $post_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($id), $size); $imgsize = $size; } if($post_thumb[0]) { if(is_singular()) { $post_thumb = '<div class="post-thumb" style="background-image: url('.$post_thumb[0].');"></div>';'
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptHey the code is clear. Thank you for answering ??
There is no content PHP file.
Why is there a rule against helping someone modify something they’ve bought?
If you had a Samsung TV and wanted to rebuild it into a fridge I think Samsung could not sue me for helping you with that ??
Jokes aside. I’m searching through all php files now for thumbnail text but not sure what I’m looking for. This is confusing. Thank you for trying though.
Your post was like Greek to me.
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptI’m suspecting it’s here but when I removed some of this the whole site stopped working. Not event ext showed up.
// Post thumbnail generator function mamontov_post_thumb($id, $size='preview') { $post_custom_thumb = get_post_meta($id, 'video_thumb', true); if(!$post_custom_thumb) { if(is_singular()) { $post_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'main'); $imgsize = 'main'; } else { $post_thumb = wp_get_attachment_image_src(get_post_thumbnail_id($id), $size); $imgsize = $size; } if($post_thumb[0]) { if(is_singular()) { $post_thumb = '<div class="post-thumb" style="background-image: url('.$post_thumb[0].');"></div>'; } else { if(MAMONTOV_LAZYLOAD == 1) { $post_thumb = "<a href='".esc_url( get_permalink() )."' class='featured-image'><i data-srcurl='".$post_thumb[0]."' data-alt='".get_the_title()."' data-title='".get_the_title()."' class='lazyload'></i></a>"; } else { echo "<a href='".esc_url( get_permalink() )."' class='featured-image'>"; the_post_thumbnail($imgsize); echo "</a>"; $post_thumb = null; } } } else { $post_thumb = null; } } else { $post_thumb = '<div class="custom-featured">'.do_shortcode($post_custom_thumb).'</div>'; } return $post_thumb; } // Images in post for post type Gallery function mamontov_images_in_post($size = 'main') { if($images = get_posts(array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'numberposts' => -1, // show all 'post_status' => null, 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'DESC' ))) { $i = 0; foreach($images as $image) { $i++; $attimg = wp_get_attachment_image_src($image->ID, $size); if(is_singular()) { echo "<li class='singular-thumbnail-as-slider' style='background-image: url(".$attimg[0].");'>"; } else { echo "<li>"; if(MAMONTOV_LAZYLOAD == 1) { echo "<i data-srcurl='".$attimg[0]."' data-alt='".$image->post_name."' data-title='".$image->post_title."' class='lazyload'></i>"; } else { echo "<img src='".$attimg[0]."' alt='".$image->post_name."' title='".$image->post_title."' />"; } } echo "</li>\n"; } } } // Previous / next navigation in Archive function mamontov_content_nav() { global $wp_query; if ( $wp_query->max_num_pages > 1 && !is_singular() && !is_404()) : ?> <nav class='navigation' role='navigation' data-infinitescroll='<?php echo MAMONTOV_INFINITE_SCROLL; ?>'> <?php next_posts_link( ''.__( 'Older posts', 'mamontov'). ' <span class="meta-nav next"><i class="fa fa-angle-right"></i></span>' ); ?> <?php previous_posts_link( '<span class="meta-nav"><i class="fa fa-angle-left"></i></span> '.__( 'Newer posts', 'mamontov').'' ); ?> </nav> <?php endif; } if (!function_exists('print_a')) { function print_a( $a ) { print( '<pre>' ); print_r( $a ); print( '</pre>' ); } }
Forum: Fixing WordPress
In reply to: How to find PHP code in custom scriptmajor-themes DOT com/themes/barcelona/
Forum: Fixing WordPress
In reply to: Comments off, despite being onHey Jose, thank you for answering. It’s an issue only with this theme.