Forum Replies Created

Viewing 15 replies - 91 through 105 (of 132 total)
  • Ugh I have been hacked before. Your hosting company should be able to help you in addition to your solution. I would recommend installing a security plugin like Sucuri and running a malware scan. That will detect the corrupted files so you can delete them.

    Hmm. How about reaching out to your hosting company? There is a good chance they can restore your site to a time it was working. Ask them to restore it to yesterday’s back up (if yesterday was working). Or the most recent back up they have. After that run a malware scan because if you didn’t change anything, it shouldn’t have gone down.

    Hi there,

    Do you have access to the FTP? I would recommend opening the file in question, finding that function, and making sure the syntax is correct.

    Were any adjustments made recently to your code? Are you working in a child theme? I ask because it is best practice not to touch any core WP files and to work within a child theme. If that is what you or your programmers are doing then the error is most likely in the child theme but affecting the taxonomy.php. So I would look for a function in your child theme (functions.php hopefully) that does something with object labels or taxonomies, check the syntax, or comment it out. See if that fixes the errors.

    Hi ketanco,

    Could you provide links to both sites? I could inspect the code to see if I can tell.

    I second what Kathryn said. Also if you would like to change the opacity back to 100% at a certain width, like https://tomvanarken.nl/ does at 700px, you just need a media query in your custom CSS.

    A media query tells the screen, “Hey, at this width do this.” If you add the background-color: rgba(0, 0, 0, 0.6); Kathryn suggested, then add this at the bottom of your custom CSS:

    @media only screen and (max-width: 700px) {
        .sidebar .sidebar-content {
            background-color: rgba(0, 0, 0, 1);
        }
    }

    This will change it to solid black when the screen is 700px wide.

    My first suspicion is that since you’re starting with a child theme from scratch, you might not be calling the img folder correctly.

    What if you try one (or both) of these where you call your template files?

    $imagepath = STYLESHEETPATH .'/img/';
    $imageurl = get_bloginfo('stylesheet_directory') .'/img/';

    Hi Galou314,

    When you say blank, do you mean even the admin bar isn’t showing? Are you able to get into the admin? If not, this is usually an error in code. When this happens to me, the culprit is usually a function in my functions.php file.

    WP Super Cache can cause conflicts with other plugins and maybe even your hosting service. For example if you have WP Engine, you can’t have WP Super Cache. Also I found that WP Super Cache conflicted with my slider plugin.

    Maybe try disabling each plugin one by one, if you have access to your admin. Or deactivate them all then reactivate one by one and see if the pages go blank. Let me know if that works.

    How long has your site been live? It could take a while for Google to get around to indexing your site. Also make sure you don’t have “Discourage search engines from indexing this site” checked under Settings > Reading.

    Hello there,

    I had a similar issue and I had to do a rewrite. Maybe try this in your functions.php file:

    add_filter('post_type_link', 'my_rewrite', 1, 3);
    
    function my_rewrite( $link, $post = 0 ){
        if ( $post->post_type == 'news' ){
            return home_url( 'news/' . $post->ID );
        } else {
            return $link;
        }
    }
    
    add_action( 'init', 'my_rewrite_init' );
    
    function my_rewrite_init(){
        add_rewrite_rule(
            'news/([0-9]+)?$',
            'index.php?post_type=news&p=$matches[1]',
            'top' );
    }
    Thread Starter amandathewebdev

    (@amandathewebdev)

    OK I figured it out with (a lot of) help. For anyone stumbling on this later, the filter I use is for the Genesis framework, so if you’re not using a framework I imagine the filter would be for the default WP. This is all in my functions.php

    function get_src() {
      if ( has_post_thumbnail() ) {
    	$src = wp_get_attachment_image_src( get_post_thumbnail_id(), 'thumb' );
    	$fbimage = $src[0];
      } else {
    	global $post, $posts;
    	$fbimage = '';
    	$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',
    	$post->post_content, $matches);
    	$fbimage = $matches [1] [0];
      }
      if(empty($fbimage)) {
        $fbimage = site_url().'/wp-content/themes/epik/img/logo.png';
      }
      return $fbimage;
    }
    add_filter('genesis_get_image', 'default_image_fallback', 10, 2);
    function default_image_fallback($output, $args) {
        return get_image();
    }
    
    function get_image($class="") {
        $src = get_src();
        ob_start()?>
        <a href="<?php echo get_permalink() ?>">
            <img class="featured-image <?php echo $class ?>" src="<?php echo $src ?>" alt="<?php echo get_the_title() ?>" />
        </a>
        <?php return ob_get_clean();
    }
    Thread Starter amandathewebdev

    (@amandathewebdev)

    If I add add_action( 'genesis_get_image', 'get_image', 3 ); then I see the img URL text next to every blog post. Not an image, but it’s something.

    Thread Starter amandathewebdev

    (@amandathewebdev)

    Hmmm… right. I’m still not great with programming. Maybe I need to add a filter? Trying some out but I’m not having luck.

    Thread Starter amandathewebdev

    (@amandathewebdev)

    Hi Marios,

    I only have this inside my functions.php. I do not know ho to debug – I will hold off on that depending on what you think about me having this code only in my functions.php file

    Thread Starter amandathewebdev

    (@amandathewebdev)

    Whoops sorry, I’ve been messing around with woocommerce filters trying to figure this out. You did mark it as resolved before I made that change though.

    Try this link: https://lgs2015.wpengine.com/product-category/man-made-quartz/?swoof=1&pa_color=black

    At least when your plugin is activated the filter gives me a new page, so I know SOMETHING is happening. But for some reason it’s not filtering.

    Thread Starter amandathewebdev

    (@amandathewebdev)

    It’s: ?filter_color=44

Viewing 15 replies - 91 through 105 (of 132 total)