ThemeForest

Posts by wpCanyonThemes

1382 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

Well same as for games, it’ll get cracked :)

People buy and will continue to buy themes because of the support, no need to worry.

1382 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

Well i guess it’s not because of the design, looks nice.

Has to be the coding or the documentation.

Make sure the coding validates, http://validator.w3.org/, the documentation is clear and the coding is clean.

@MASSIX – “the slider looks like some others i have already seen here”, well actually these days everyone is using NivoSlider and the accordion slider, not sure about the name, so it’s not that :)

1382 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

Check if php_gd2 extension is enabled.

1382 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

Sorry, one change.

if(isset($new_page_template)){

it should be

if(!empty($new_page_template)){
1382 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Serbia
wpCanyonThemes says

Slightly improved version of Matt’s snippet.

  • It was executing the get_page_by_title() every time a page loads, now only when the theme is activated
  • wp_insert_post() returns the id, so no need to execute get_page_by_title() after the page is added
  • and a few more things…
if ($_GET['activated']){

    $new_page_title = 'This is the page title';
    $new_page_content = 'This is the page content';
    $new_page_template = ''; //ex. template-custom.php. Leave blank if you don't want a custom page template.

    //don't change the code bellow, unless you know what you're doing

    $page_check = get_page_by_title($new_page_title);
    $new_page = array(
        'post_type' => 'page',
        'post_title' => $new_page_title,
        'post_content' => $new_page_content,
        'post_status' => 'publish',
        'post_author' => 1,
    );
    if(!isset($page_check->ID)){
        $new_page_id = wp_insert_post($new_page);
        if(isset($new_page_template)){
            update_post_meta($new_page_id, '_wp_page_template', $new_page_template);
        }
    }

}

Wrote an article about it too, so if anybody is interested check it out.

by
by
by
by
by