Forum Replies Created

Viewing 15 replies - 1 through 15 (of 320 total)
  • Max

    (@clementsm)

    Here is a long somewhat simplified answer. So an inode is a data-structure that contains meta-data about a file. Every linux file system has only a limited amount of them, and you use at least one of them for every file.

    There is an assumption made when formatting a Linux file system on the minimum average size of a file. Basically volume size divided by the number of inodes, gives you the minimum average size of the files you should be storing.

    If you store lots of small files in your folder, that are less than the minimum average file size as per that equation for your file system, then you can use up all your inodes and no longer be able to store any additional files to your disk, even though you may still have space left on the volume.

    What your hosting company is telling you is that they have only allocated 300,000 inodes to your account, and that for some reason you have exhausted them.

    What you could do is get a listing of all the files on your shared space and see if you have one folder with a lot of small files. hehehuhu is possibly correct, automatic backups and so on are often guilty.

    Max

    (@clementsm)

    After you do a redirect you should exit the script. A redirect causes a new page-load which will start the execution of a new script.

    I am not really sure what you are trying to achieve with this statement:

    return wp_safe_redirect( $lost_password_url );

    A return call in a function ends execution of the function and causes the function to return the value of the parameter passed to the return.

    wp_safe_redirect() is another function call that causes an HTTP redirect response to be sent to the client browser, which then should follow the response to a new location. It also does not return a value.

    There is no point to use return after a re-direct as you would like the current script to stop execution, given the client will request a new page. This is why you want to call “exit” directly after a wp_safe_redirect() statement, so that the script stops execution.

    wp_safe_redirect() will only allow redirects to local URLs, or to the wp-admin url on the site_url. This prevents someone (or a plugin) from adding another host to the redirect. You should probably always consider using wp_safe_redirect(), unless you want to send your visitors somewhere off your site on purpose.

    Max

    (@clementsm)

    Adding to what is above – login to “https://www.google.com/webmasters/” and then you can see (after verifying ownership) what google is and is not indexing.

    Max

    (@clementsm)

    Afraid that Edge is a commercial theme – so you really should speak to Themeforest to help you remove the primary side-bar. The author of the them provides free support for 6 months after purchase.

    Max

    (@clementsm)

    What does the error_log on your web-server say? That should give you a clue as to what is happening, and most likely the exact error the PHP interpreter is encountering.

    Max

    (@clementsm)

    Well, since an unregistered user is not logged in, you would need to find another mechanism to track them when they return. A usual way of doing this is to simply set a cookie with a unique ID in your responses to an unregistered user, and then store that cookie in a database, together with a counter of each time that person visits.

    When you set a cookie, the browser that the user is using, will store the value and name of the cookie, together with the website that set it, in its cookie-jar. If the same browser (which is usually the same person) re-visits the website, then the browser looks in its cookie jar, to see if it has a cookie that has not expired for that website, and then returns the cookie in the HTTP request that it makes to the website. This cookie is then visible to PHP from which you can track the user.

    This functionality is not built into WordPress, so this is something you would need to code up in order for it to work, by writing a plugin or something similar, using the PHP setcookie function.

    To generate a unique ID for a user, you can simply use a Globally Unique Identifier (GUID) function in PHP (com_create_guid() in PHP5+).

    You then save this GUID in the database together with a count.

    Be careful to only set the cookie when there is no cookie in the request. A good place to hook this code would be somewhere that is called every time a page is viewed – such as header.php.

    Max

    (@clementsm)

    You should open a case with your hosting provider to find out. Cpanel sums together everything in your location on the server. It may be something simple like web-server log files, which you can delete.

    Max

    (@clementsm)

    You probably want to make sure you use the same collation and char-set for every table.

    I would recommend you change the line in your wp-config.php to:

    define ( 'DB_CHARSET', 'utf8');

    and add a collation:

    define ( 'DB_COLLATE', 'utf8_unicode_ci');

    Then once you have done this, set the default character-set and collation for your database using the following SQL Query:

    ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    You should replace the word databasename with your actual database name.

    Then after you have done that – you will need to change the collation and character-set on every table in the database to match. This will convert the tables to use the same character-set and collation:

    ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    Again, change tablename to the name of every table that you wish to change.

    Needless to say, you need to make a backup before you do any of this to your database.

    At this point everything in your database should be converted to UTF8 as well, and things should start to be interpreted correctly.

    Max

    (@clementsm)

    The output of that code is going to be a big list of anchor tags, you probably want them formatted as a list. Also, given the way you have coded it, I am guessing you also want a link in this list to each category. Given these assumptions – something like this could work:

    <?php
    	$args = array(
    		'orderby' => 'name',
    		'parent' => 0
    	);
    $categories = get_categories( $args );
    ?>
    <ul class="category-list">
    <?php
    	foreach ( $categories as $category ) {
    		echo '<li><a href="' . esc_url( get_category_link( $category->cat_ID ) ); . '" title="' . $category->name . '">' . $category->name . '</a></li>';
    ?>
    </ul>

    That should give you a nice big HTML list including links to all the categories. After you have done that you would need to format the list into 3 columns using css.

    CSS that should work is something like the following:

    ul{
      width:960px;
      overflow:hidden;
    }
    li{
      float:left;
      display:inline;
    }
    .category-list li  {
    	width: 33%;
    }

    Obviously my CSS is just a sample, you would need to tinker with this to make it display with the correct margins, line-heights and to fit into the area where you would like this to display, but it should give you an idea how to make this work.

    Bear in mind that the order will be meaningless if you do this, so do not use this technique if order is important.

    Lastly, a disclaimer, I did not test this code, so don’t run this on a production site, as a single syntax error will cause a 500 error from PHP and cause your site to serve blank pages, meaning you need to login with FTP to revert the syntax error. Make a backup before you start to tinker with this code on a production site.

    Max

    (@clementsm)

    How about you share your .htaccess file with us, as this does sound like it could be related?

    Also, take a look at your web-server log files. You will see the 404 logged there, with the path that it was trying to access in the error-log.

    Forum: Fixing WordPress
    In reply to: theme header php
    Max

    (@clementsm)

    You have an open <script> tag before the line “<meta charset="<?php bloginfo( 'charset' ); ?>">“, that is not closed.

    I believe your code should look as follows:

    <head>
    	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    	<!-- marketing -->
    	<ins class="adsbygoogle"
    		style="display:block"
    		data-ad-client="ca-pub-3526791549033206"
    		data-ad-slot="4428464488"
    		data-ad-format="auto"></ins>
    	<script>
    		(adsbygoogle = window.adsbygoogle || []).push({});
    	</script>
    	<meta charset="<?php bloginfo( 'charset' ); ?>">
    	<meta name="viewport" content="width=device-width">
    	<title><?php wp_title( '|', true, 'right' ); ?></title>
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    	<!--[if lt IE 9]>
    	<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
    	<![endif]-->
    	<?php wp_head(); ?>
    </head>

    ie., you are missing two lines:

    (adsbygoogle = window.adsbygoogle || []).push({});
    	</script>
    Max

    (@clementsm)

    Please link to a page on your site that shows the problem, else we cannot help you.

    Forum: Fixing WordPress
    In reply to: CMS
    Max

    (@clementsm)

    Sounds like you are looking for e-commerce functionality. You have a couple of choices to make:

    1. You can use dedicated e-commerce software like Magento which has open-source versions as well as commercial versions. Magento is not trivial to implement and run effectively, so unless you have experience with it, you may want to look at a managed version of it.
    2. You can use plugin with WordPress, such as Woocommerce or WP eCommerce. All of these require theme support – so you would still need to code the presentation layer for them.
    3. You can also choose a commercial product, such as Shopify.

    Which you choose depends on your requirements, the skills you have, or have access too, your cost to develop these solutions and how much your customer is willing to pay.

    Max

    (@clementsm)

    Custom permalinks? Did you write the code yourself, or is it a plugin? Could you share either your code for the permalinks – or the plugin that you are using?

    Max

    (@clementsm)

    I would probably make sure that the DB collation/Charset is actually also in UTF8, then you should not have problems. You should and see what collation/charset the tables in your database currently have – it sounds like they may not be in UTF8?

    To convert your database default char-set and collation to UTF8 you should execute this query:

    ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    You should replace the word “databasename” with your actual database name.

    This only changes the database default for future tables added to the database. You also need to convert every table in the database using the following query:

    ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

    Needless to say, you need to make a backup before you do any of this to your database.

    At this point everything in your database should be converted to UTF8 as well, and things should start to be interpreted correctly.

Viewing 15 replies - 1 through 15 (of 320 total)