Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Thanks for the quick answer! It seems that even though cPanel said it was running 7.2.7., the debug info plugin said it was running 5.6.4 so it was an old one. I contacted the Bluehost service and they helped me to update the site, so the issues seemed to be at my end. I was also able to update the plugin now.

    Thanks for your plugin, otherwise I wouldn’t have noticed that I’m running an old version of PHP!

    Forum: Fixing WordPress
    In reply to: Database issues
    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Thanks @phptechie ! I’ll try to delete even more plugins and we’ll see what happens. I will get back to the forums if the problems still continue to occur and try to look at the logs of what could be the issue.

    Forum: Fixing WordPress
    In reply to: Database issues
    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Catacaustic: Thanks! I was thinking about if upgrading the hosting would help this as well (currently I have the most basic hosting service from bluehost). I think they upgraded the server when I asked them the 5th/6th time about the same error, but it seems like the errors still randomly happen.

    However, when I asked this from the bluehost CSR, they said, that the issue is in the process running in my website (too many plugins, too much load to the database) and there is no need for me to upgrade the hosting service. I took their word for it as I thought, anyone would have jumped to the opportunity to sell me the better hosting plan if it would actually help.

    What do you think, did the CSR know what they were talking about or is hosting plan actually related to the database of my website?

    Forum: Fixing WordPress
    In reply to: Database issues
    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Thanks for you reply Sundar!

    Yes you are correct, it’s just a personal blog. Forgot to mention that in the opening post.

    I think the most common two errors are:

    “500 internal server error” and
    “Error establishing a database connection”

    I will take screen captures if the site gets an error in the following days.

    Also, good thing that you mentioned that I have a lot of plugins as I don’t really know what is actually a lot or good amount of plugins in a normal blog, hmm. Here are the plugins and the reasons for them. Also, I would like to here input on the performance enhanching ones, do they actually enhance performance in a website, which is mostly text.

    From what I have understood the must plugins are:

    – Akismet-spam(well, because spam)
    – Disable Gutenberg (tried Gutenberg for a while, but doesn’t really work well with a full-text blog)
    Header and Footer Scripts/Say What? (needed for affiliate marketing links as I don’t want to touch the actual code)
    – Jetpack by WordPress.com (I guess this is a must have for all blogs?)
    – Login LockDown (safety is nice)
    – Yoast SEO (not a SEO guru yet, so this one helps a ton)


    And the additional ones are for me:

    – Annual Archive (well this I could delete)
    – Google Analytics (I could live without, but still useful)
    – Link Manager (No need at the moment)
    – No Self Pings (not necessary, but don’t really care about self pings)
    – OPML (well, this one I can delete)
    – WP to Twitter (Saves time a lot)
    – WP User Avatar(this one not necessary)

    Here I can delete a few, but I don’t think the plugins are that big, so I don’t know if it makes a lot of difference.

    And about the performance enhancing ones:

    – Really Simple SSL
    – WP Super Cache
    – WP-Optimize
    – WP-Sweep
    – Smush

    Well the SSL one is necessary if I want to run SSL on my site. About the other ones, I feel like everyone on the internet says that every site should have these ones. But I wonder if all those optimizations, sweeps and smushs are necessary for a blog, which has only test (and maybe 1-2 pictures per post)? Or do they actually make the blog just heavier?

    Thanks again!

    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Hey, thanks for the answer! Do you have any advice for creating the code since I’m no expert creating the code. The Activello post looks like this.

    /**
    * activello Top Posts Widget
    * activello Theme
    */
    class custom_activello_recent_posts extends WP_Widget
    {
    function __construct(){

    $widget_ops = array(‘classname’ => ‘activello-recent-posts’,’description’ => esc_html__( “Activello recent posts widget with thumbnails”, ‘activello’) );
    parent::__construct(‘custom_activello_recent_posts’, esc_html__(‘Activello Recent Posts Widget’,’activello’), $widget_ops);
    }

    function widget($args , $instance) {
    extract($args);
    $title = isset($instance[‘title’]) ? esc_html( $instance[‘title’] ) : esc_html__(‘recent Posts’, ‘activello’);
    $limit = isset($instance[‘limit’]) ? esc_html( $instance[‘limit’] ) : 5;

    echo $before_widget;
    echo $before_title;
    echo $title;
    echo $after_title;

    /**
    * Widget Content
    */
    ?>

    <!– recent posts –>
    <div class=”recent-posts-wrapper”>

    <?php

    $featured_args = array(
    ‘posts_per_page’ => $limit,
    ‘ignore_sticky_posts’ => 1
    );

    $featured_query = new WP_Query($featured_args);

    /**
    * Check if zilla likes plugin exists
    */
    if($featured_query->have_posts()) : while($featured_query->have_posts()) : $featured_query->the_post();

    ?>

    <?php if(get_the_content() != ”) : ?>

    <!– post –>
    <div class=”post”>

    <!– image –>
    <div class=”post-image <?php echo get_post_format(); ?>”>

    “><?php
    if(get_post_format() != ‘quote’) {
    echo get_the_post_thumbnail(get_the_ID() , ‘full’);
    }
    ?>

    </div> <!– end post image –>

    <!– content –>
    <div class=”post-content”>

    “><?php echo get_the_title(); ?>
    <span class=”date”>- <?php echo get_the_date(‘d M , Y’); ?></span>

    </div><!– end content –>
    </div><!– end post –>

    <?php endif; ?>

    <?php

    endwhile; endif; wp_reset_query();

    ?>

    </div> <!– end posts wrapper –>

    <?php

    echo $after_widget;
    }

    function form($instance) {

    if(!isset($instance[‘title’])) $instance[‘title’] = esc_html__(‘recent Posts’, ‘activello’);
    if(!isset($instance[‘limit’])) $instance[‘limit’] = 5;

    ?>

    <p><label for=”<?php echo $this->get_field_id(‘title’); ?>”><?php esc_html_e(‘Title’, ‘activello’) ?></label>

    <input type=”text” value=”<?php echo esc_html($instance[‘title’]); ?>”
    name=”<?php echo $this->get_field_name(‘title’); ?>”
    id=”<?php $this->get_field_id(‘title’); ?>”
    class=”widefat” />
    </p>

    <p><label for=”<?php echo $this->get_field_id(‘limit’); ?>”><?php esc_html_e(‘Limit Posts Number’, ‘activello’) ?></label>

    <input type=”number” value=”<?php echo esc_html($instance[‘limit’]); ?>”
    name=”<?php echo $this->get_field_name(‘limit’); ?>”
    id=”<?php $this->get_field_id(‘limit’); ?>”
    class=”widefat” />
    <p>

    <?php
    }

    /**
    * Sanitize widget form values as they are saved.
    *
    * @see WP_Widget::update()
    *
    * @param array $new_instance Values just sent to be saved.
    * @param array $old_instance Previously saved values from database.
    *
    * @return array Updated safe values to be saved.
    */
    public function update( $new_instance, $old_instance ) {
    $instance = array();
    $instance[‘title’] = ( ! empty( $new_instance[‘title’] ) ) ? esc_html( $new_instance[‘title’] ) : ”;
    $instance[‘limit’] = ( ! empty( $new_instance[‘limit’] ) && is_numeric( $new_instance[‘limit’] ) ) ? esc_html( $new_instance[‘limit’] ) : ”;

    return $instance;
    }
    }

    function custom_activello_widgets_init(){
    unregister_widget( ‘activello_recent_posts’ );
    register_widget( ‘custom_activello_recent_posts’ );
    }
    add_action( ‘widgets_init’, ‘custom_activello_widgets_init’, 99 );

    Should I just replace the activello ′spots with the word “sparkling” and it should work or do I need more drastic modification of the code? Thanks!

    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Thanks a lot. One last question I promise. I a,m using the sparkling’s own widget “popular posts” and noticed that in order to fit the small picture on the sidebar perfectly, the picture in the post must be 500×500.

    Is there any way that I can make smaller /bigger pictures scale automatically to the widget since it looks a bit odd if the picture in the post doesn’t fit the widget’s small picture perfectly. Thanks!

    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Sure thing, sorry, I meant the title of the blog. “omavaraisuushaaste” is the name of my blog. Thanks!

    Thread Starter omavaraisuushaaste

    (@omavaraisuushaaste)

    Thanks a lot Vinod! And the set font you put to the code was just perfect.

    On a follow up note, what’s the code to change the “Omavaraisuushaaste” banner font color / size and is there a way to add a picture there instead of the text?

    Thanks for an awesome layout!

Viewing 8 replies - 1 through 8 (of 8 total)