Magzine

Contents

1. It says the theme is broken or missing a style sheet?

2. Updating your PHP version

3. How do I add/edit the favicon?

4. Manually editing user rating on a post

5. How do I add/remove breadcrumbs?

6. Increasing Maximum Input Vars

7. How do I set Web Hosting details?

8. Increasing Post Maximum Size

9. Increasing PHP Memory Limit

10. "The link you followed has expired. Please try again." error

11. I would like a refund?

12. Increasing WordPress Upload Limit

13. Increasing PHP Maximum Execution Time

14. Translating the months in release dates

15. How do I find my ThemeForest Item Purchase Code?

16. How I do I disable the WordPress Admin Bar for users?

17. Why am I not receiving emails?

18. Switching To Tablet and Mobile View in Elementor

19. Creating BuddyPress Profile Menus

20. Finding the cause of your issue(s)

21. Ordering posts by views

22. How do I allow users to register to my site?

23. I get a Page Not Found error when I click on links?

24. What SEO plugin do you recommend?

25. Adding shortcodes via custom fields

26. Adding custom post/page options

27. Using comment plugins such as Disqus

28. How to add custom fields

1. It says the theme is broken or missing a style sheet?

If after installing the theme it says it is broken or the style sheet is missing it's nothing to worry. This is one of the most common errors new users to WordPress experience. To upload the theme correctly do the following:

  1. Go to your ThemeForest Downloads page, locate the theme, click the green Download button and select the Installable WordPress file only option.
  2. Log in to the WordPress Admin Panel.
  3. Go to Appearance > Themes.
  4. Click the Add New button.
  5. Click the Upload Theme button and upload the zip file you just downloaded.

2. Updating your PHP version

The theme requires at least PHP 7.3 or above because this is what WordPress itself recommends.

Updating Your PHP Version

In most cases you cannot update the PHP version yourself and need to contact your host about this. The upgrade process is easy and should be something your host can do for you without impacting your website or charging you a fee. Here's an email you can send to your hosting company:

Dear host,

I'm running a site on one of your servers and WordPress has listed PHP 7.2 as the recommended version on their requirements page: https://wordpress.org/about/requirements/

Can you please let me know if my hosting supports PHP 7.2 or higher and how I can upgrade?

Looking forward to your reply.

VPS Server

If you have a VPS server, see How to upgrade from PHP 5.

My Host Doesn't Support PHP 5.6

If your host doesn't support PHP 5.6 or higher, you will need to find a host that does. We recommend DreamHost which supports PHP 5.6 or higher. If you contact another host, be sure to ask them which PHP version your website will run on before purchasing.

3. How do I add/edit the favicon?

This is a core WordPress option and not part of the theme. Go to Appearance > Customize > Site Identity > Site Icon to change the favicon.

4. Manually editing user rating on a post

To manually edit the user rating on a post add the following to your child theme's functions.php file:

function ghostpool_update_average_user_rating() {
  
    $post_id = 123; 
    
    $rating_data = array();
    
    $rating_data['average_rating'] = 7;
    
    $rating_data['rating_sum'] = 100; // Total of all the user ratings added together
    
    $rating_data['user_votes'] = 1;
    
    $rating_data['criteria'] = array(
        array( 'criterion' => 'Criterion 1', 'rating' => 5 ),
        array( 'criterion' => 'Criterion 2', 'rating' => 2 ),
        array( 'criterion' => 'Criterion 3', 'rating' => 3 ),
    );    
        
    update_post_meta( $post_id, 'gp_post_user_rating_data', $rating_data );
    update_post_meta( $post_id, 'gp_average_user_rating', $rating_data['average_rating'] );
    update_post_meta( $post_id, 'gp_user_votes', $rating_data['user_votes'] );
    
}
add_action( 'init', 'ghostpool_update_average_user_rating' );

Edit the post ID, average rating, rating sum, user votes and criterion data to what you want. If the post has no criteria ratings replace this with:

$rating_data['criteria'] = array();  

Now go to your post and refresh the page. Once the user rating has been updated remove this code from your functions.php file.

5. How do I add/remove breadcrumbs?

The breadcrumbs shown in the demo are added by the Yoast WordPress SEO plugin. Install this plugin and then go to SEO -> Search Appearance and click the Breadcrumbs tab and click Enabled.

6. Increasing Maximum Input Vars

Maximum input vars limit the number of input variables which affect menus and theme options in the Aardvark theme. To increase the Maximum input vars do the following:

Method 1: Increasing Max Input Vars In .htaccess File

Step 1: Locate the .htaccess file inside the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel (if you can’t find it see why you can’t find the .htaccess file and how to find it or if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Paste this code in .htaccess file:

php_value max_input_vars 1000
php_value suhosin.get.max_vars 1000
php_value suhosin.post.max_vars 1000
php_value suhosin.request.max_vars 1000

Step 3: Now save the file.

Method 2: Increasing Max Input Vars In php.ini File

Step 1: Locate the php.ini file inside the /wp-admin directory using an FTP client or file manager in your web hosting control panel (if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Paste this code in  your .php.ini file:

max_input_vars = 1000
suhosin.get.max_vars = 1000
suhosin.post.max_vars = 1000
suhosin.request.max_vars = 1000

Step 3: Now save the file.

Step 4: If you still have issues, look for this file in your root directory and make the same changes.

7. How do I set Web Hosting details?

The web hosting details display on the right is generated from custom fields. To add/edit/delete these custom fields on your posts see:

How to add custom fields

Now you can use the following custom field names and set the values to whatever you want to display.


8. Increasing Post Maximum Size

To increase the Post Maximum Size do the following:

Step 1: Locate the php.ini file inside the /wp-admin directory using an FTP client or file manager in your web hosting control panel (if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Find the following line in your php.ini file:

post_max_size

Step 3: Increase the value to 64MB or higher and save the file.

Step 4: If you still have issues, look for this file in your root directory and make the same changes.

9. Increasing PHP Memory Limit

To increase the PHP Memory Limit do the following:

Method 1: Increasing Memory Limit In wp-config.php File

Step 1: Locate the wp-config.php file inside the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel (if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Paste this code in your wp-config.php file just before the line that says “That’s all, stop editing! Happy blogging.”:

define( 'WP_MEMORY_LIMIT', '256M' );

Step 3: Now save the file.

Note: If this solution does not work then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web host to increase this limit for you.


Method 2: Increasing Memory Limit In php.in File

Step 1: Locate the php.ini file inside the /wp-admin directory using an FTP client or file manager in your web hosting control panel (if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Paste this code in  your .php.ini file:

memory_limit 256MB;

Method 3: Increasing Memory Limit In .htaccess File

Step 1: Locate the .htaccess file inside the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel (if you can’t find it see why you can’t find the .htaccess file and how to find it or if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Paste this code in your .htaccess file:

php_value memory_limit 256M

Step 3: Now save the file.

Note: If you encounter any errors while trying to set the memory limit using these two methods then it means your hosting provider has locked this setting and you will have to contact them to increase this limit.


10. "The link you followed has expired. Please try again." error

You are seeing this error because the theme is too big to be uploaded to your site. This is because your web host has set one of the following too low:

- PHP Memory Limit (should be 256MB or higher)

- Post Maximum Size (should be 64MB or higher)

- WordPress Upload Limit (should be 64MB or higher)

Follow the links for how to increase each of these values.

Alternatively you can upload the theme through an FTP client or file manager in your cPanel. To set up an FTP client refer to the WordPress documentation on this http://codex.wordpress.org/FTP_Clients.

Once you have set up your FTP client upload the aardvark theme folder to /wp-content/themes/ directory on your server.


11. I would like a refund?

Before requesting a refund

If you're having any issues with a theme you've just purchased this can be incredibly frustrating, however in most cases the issues can be quickly resolved.

How to request a refund

If you have not yet downloaded the theme you can request a refund, no questions asked, from: https://themeforest.net/refund_requests/new

If you have downloaded the theme this means you now have a copy of the theme and will only be eligible for a refund if it meets one or more of the following criteria:

Refund process

Before I can issue a refund I need to determine that the theme is causing your issues (in most refund request cases, it turns out not to be).

To do this please open a support ticket at https://ghostpool.ticksy.com and describe your problems in as much detail as possible, providing any error messages you receive and the steps to replicate the problem.

If it does turn out to be a theme issue and I cannot fix it, you will be issued with a full refund.

Why a refund will not given

You will not receive a refund in the following situations:



12. Increasing WordPress Upload Limit

To increase the WordPress Upload Limit do the following:

Step 1: Locate the php.ini file inside the wp-admin directory (if you’re not sure how to do this, ignore the steps below and contact your webhost who can do this for you).

Step 2: Find the following line in your php.ini file:

upload_max_filesize

Step 3: Increase the value to 64MB or higher and save the file.

Step 4: If you still have issues, look for this file in your root directory and make the same changes.

13. Increasing PHP Maximum Execution Time

To increase the PHP Maximum Execution Time do the following:

Method 1: Editing .htaccess File Manually

Step 1: Locate the .htaccess file inside the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel (if you can’t find it see why you can’t find the .htaccess file and how to find it or if you’re not sure how to do this, ignore the steps below and contact your web host who can do this for you).

Step 2: Paste this code in your .htaccess file:

php_value max_execution_time 180

Step 3: Now save the file.

Note: If you still get the error, try increasing the value to 600.

Method 2: Using A Plugin

Step 1: If you're not able to edit .htaccess file manually, then you can install and activate the WP Maximum Execution Time Exceeded plugin. That’s all. The plugin works out of the box and increases the maximum execution time to 300 seconds.

14. Translating the months in release dates

In your child theme's functions.php file add the following:

function ghosptool_translate_months( $date ) {
    // Add all months you want translated
    $current_months = array( 'January', 'February', 'March', 'etc' );
    
    // Add all your translated months in same order with their counterparts
    $translated_months = array( 'Enero', 'Febero', 'Marzo', 'etc' );
    
    $translated_date = str_ireplace( $current_months, $translated_months, $date );
    return $translated_date;
}
add_filter( 'ghostpool_post_meta_release_date', 'ghosptool_translate_months' );

15. How do I find my ThemeForest Item Purchase Code?

To find your licence key/purchase code you need to log into your ThemeForest account and go to your “Downloads” page.

Locate the relevant theme and click on the Download button and next on the License Certificate & purchase code link in drop-down menu.

After you have downloaded the certificate you can open it in a text editor such as Notepad and copy the Item Purchase Code.


16. How I do I disable the WordPress Admin Bar for users?

WordPress is adding the admin bar to your website, not the theme. You can use the following plugin to disable the admin bar: https://en-gb.wordpress.org/plugins/hide-admin-bar/

If you're using BuddyPress go to Settings > BuddyPress > Options and disable the Toolbar option.

17. Why am I not receiving emails?

This is unlikely to be a theme issue and it is most likely server or plugin related. 

To test this, activate the default Twenty Twenty-One theme (don't worry this won't affect your site content). If the issues still occur this means the theme is not causing the issue. Make sure whatever plugin you're using is set up correctly and that you have no typos in your email address.

If your server does not allow emails to be sent out try using the following plugin: 

https://en-gb.wordpress.org/plugins/wp-mail-smtp/

For BuddyPress emails you will also need to add the following to your functions.php file:

add_filter( 'bp_email_use_wp_mail', '__return_true' );

18. Switching To Tablet and Mobile View in Elementor

In the Elementor editor in the bottom left hand corner click the Responsive Mode icon to change the display from desktop to tablet or mobile.

You can now change the styling for the display you've switched to and access elements that may have been hidden.

Also check out this video on how to use responsive editing in Elementor.


19. Creating BuddyPress Profile Menus

Step 1: Go to Appearance > Menus and create or edit an existing menu.

Step 2: Click the Screen Options tab in the top right corner of the page and make sure the BuddyPress option is checked.

Step 3: Now scroll down the page and you will see a BuddyPress tab where you can add BuddyPress profile links to your selected menu.

20. Finding the cause of your issue(s)

To find the cause of the issue(s) please do the following:

1. Update The Theme/Plugins

Ensure you using the latest version of the theme and required plugins. We will not look at any issues if you haven’t updated these. To update the theme and required plugins please refer to the theme documentation.

2. Switch Themes

If updating the theme/plugins didn't fix the issue go to Appearance > Themes and activate the Twenty Twenty-One theme and see if the issue(s) still occur.  If your site has visitors you can use the Theme Test Drive plugin so your users don’t see the theme you’ve switched to.

If the issue(s) still occur this means the theme is not causing the issue and this is probably a general WordPress or plugin issue.

3. Deactivate All Plugins

To see if it is a plugin issue deactivate all activated plugins (except the plugins that are needed to test the issues). If this fixes the issue(s) this means the theme is not the cause. Reactivate the plugins one by one or in groups so you can identify which plugins are responsible.

4. If the theme is responsible

If the issue only occurs when this theme is activated it looks like the theme is responsible. Please provide WordPress admin access and I'll take a closer look.

21. Ordering posts by views

If ordering posts by views the theme will order by daily views but you can also order by weekly, monthly and all time views. To do this activate the Magzine Child theme and in the child theme's functions.php file add:

function ghostpool_custom_views_order() {
    return 'views_weekly';
}
add_filter( 'ghostpool_most_views_meta_key', 'ghostpool_custom_views_order' );
add_filter( 'ghostpool_least_views_meta_key', 'ghostpool_custom_views_order' );

You can use: views_total, views_monthly views_weekly, views_daily

22. How do I allow users to register to my site?

This is a general WordPress option that can be found under Settings -> General -> Anyone can register.

If you're using BuddyPress the register page should have been created automatically. If it has not, create a new page called "Register" and publish it. Now go to Settings -> BuddyPress -> Pages and select this page from the Registration dropdown menu. Now you can link to this page in your menus from Appearance > Menus.

23. I get a Page Not Found error when I click on links?

Sometimes your server rewrite rules need flushing. To do this go to Settings -> Permalinks and save the page.

In some cases you may need to change the permalink structure. To do this in the Custom Structure field add the following:

/%category%/%postname%/

Now save the page.

24. What SEO plugin do you recommend?

All my themes work well with "Yoast SEO" WordPress plugin: https://wordpress.org/plugins/wordpress-seo/

25. Adding shortcodes via custom fields

Go to Plugins > Add New and search for "Advanced Custom Fields". Install and activate this plugin.

In your child theme's functions.php file add:

function ghostpool_shortcode_meta( $value, $name ) {
    if ( get_field( $name ) ) {        
        return do_shortcode( get_field( $name ) );
    } else {        
        return $value;
    }
}
add_filter( 'ghostpool_post_meta_custom_field', 'ghostpool_shortcode_meta', 10, 2 );

Now you can use the Post Meta element. Set the Type setting to Custom Field and in the Custom Field Name give the name of the custom field you'll be adding your shortcode to.

On the desired post create a new custom field with the name you used above and the value as the shortcode.

26. Adding custom post/page options

To add your own option fields below posts/pages add the following to your child theme's functions.php file:

function ghostpool_custom_meta_boxes( $settings ) {
    
    $custom = array(
                        
        array( 
            'id' => 'gp_setting_id_2',
            'title' => esc_html__( 'Setting Name 1', 'ghostpool-core' ),
            'type' => 'text',
            'desc' => esc_html__( 'Description text 2.', 'ghostpool-core' ),
        ),
        array( 
            'id' => 'gp_setting_id_1',
            'title' => esc_html__( 'Setting Name 2', 'ghostpool-core' ),
            'type' => 'select',
            'desc' => esc_html__( 'Description text 2.', 'ghostpool-core' ),
            'options' => array(
                'option_1' => esc_html__( 'Option 1', 'ghostpool-core' ),
                'option_2' => esc_html__( 'Option 2', 'ghostpool-core' ),
                'option_3' => esc_html__( 'Option 3', 'ghostpool-core' ),
             ),
        ),
    
    );  
  
    $settings[] = array(
        'id' => 'gp-custom-settings',
        'title' => esc_html__( 'Custom Settings', 'aardvark' ),
        'post_types' => array( 'all' ),
        'exclude_post_types' => array( 'elementor_library', 'gp_theme_template' ),
        'position' => 'normal',
        'priority' => 'high',
        'section' => $custom
    );
    return $settings;
}
add_filter( 'ghostpool_metaboxes_settings', 'ghostpool_custom_meta_boxes' );

Replacing "gp_setting_id_1" and gp_setting_id_2 with your own IDs. Also change the title, field type and desc for each settings.

27. Using comment plugins such as Disqus

If you're using a plugin that modifies the comment section such as Disqus you will need to disable the theme's own comment template. To do this add the following to your child theme's functions.php file:

remove_filter( 'comments_template', 'ghostpool_load_comment_template' );

28. How to add custom fields

There are two ways to add custom fields depending on if you're using the Gutenberg Editor or Classic Editor.

Gutenberg Editor

  1. Edit or create a new post and click Options button in the top right corner. 
  2. Select Preferences from the dropdown menu to open the Preferences window.
  3. Click the Panels tab and then enable the Custom fields option - reload the page when asked to.
  1. Once the page is reloaded scroll down to the bottom of the page where you will see a new Custom Fields panel.
  2. Click the Enter New link and then give your custom field a name and the value you want to display.
  3. Finally click the Add Custom Field button.



Classic Editor

  1. Edit or create a new post and click Screen Options button in the top right corner. 
  2. Check the Custom Fields option.
  1. Scroll down to the bottom of the page where you will see a new Custom Fields panel.
  2. Click the Enter new link and then give your custom field a name and the value you want to display.
  3. Finally click the Add Custom Field button.