top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to create a custom theme in Wordpress?

0 votes
472 views

I just created a custom theme for my wordpress project inside my wp-content/themes/mycustomtheme, I added an index.php and a style.css file to the new theme but when I go to themes in my dashboard the newly created theme is not shown as an option. What else am I missing? Can anybody help me?
This is my style.css

/*
Theme Name: Start WordPress
Theme URI: http://wordpress.org/themes/startwordpress
Author: Me
Author URI: http://wordpress.org/
Description: The Start WordPress theme is my first custom theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: bootstrap, black, brown, orange, tan, white, yellow, light, one-
column, two-columns, right-sidebar, flexible-width, custom-header, 
custom-menu, editor-style, featured-images, microformats, post-
formats, rtl-language-support, sticky-post, translation-ready
Text Domain: startwordpress

This theme, like WordPress, is licensed under the GPL .
Use it to make something cool, have fun, and share what you've learned   
with others.
*/
posted May 29, 2017 by Surajit Pal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

WordPress Themes typically consist of three main types of files, in addition to images and JavaScript files.

1. The stylesheet called style.css, which controls the presentation (visual design and layout) of the website pages.

2. WordPress template files which control the way the site pages generate the information from your WordPress database to be displayed on the site.

3. The optional functions file (functions.php) as part of the WordPress Theme files.

Example: -

Follow the path of wp-content > themes to arrive at your themes folder. You’ll see the WordPress default themes – twentyfifteen, twentyfourteen, twentythirteen – and index.php. Create a new directory for your theme; I called mine newwordpresstheme.

/*
Theme Name: New WordPress Theme
Theme URI: n/a
Author: you
Author URI: n/a
Description: example description...
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: example-tag
*/
answer Jun 6, 2017 by Biswajit Maity
Similar Questions
0 votes

I want to create a separate custom 404 page for my wordpress site that when 404 error occurs then that page will be display. I create a 404 page but when I tried to test it, the 404 page of the root site appears. Can anybody help me?

0 votes

I am trying to make a custom form and insert into the database but when I click submit nothing happens. Please help me. I did research and changed my code but still same result. I don't know why.

This is the code:

<?php
/*
Template Name: Student
*/
get_header();
?>    
<?php echo "google";?>    
<?php

    if($_POST['Submit'])
        {
         global $wpdb;
         $name=$_POST['aname'];
         $roll=$_POST['aroll'];
         $dept=$_POST['adept'];
              if($wpdb->insert(    
                  'std', array(
                               'name' => $name,
                               'roll' => $roll,
                               'dept' => $dept
                               )
                               ) == false) wp_die('Database insertion failed');
     else 
          echo "<p>Database insertion successful</p>";  
?>
<?php
}
else //else we didnt submit the form, so display the form
{
?>
<form action="" method="post" id="addcourse">
<label> Student Name:<input type="text" 
name="aname" size="30" /></label>
<label> Roll:<input type="text" 
name="aroll" size="30" /></label>
<label> Department:<input type="text" name="adept" size="30" /></label>
<br />
<input type="Submit" id="addcoursesubmit" value="submit" />
</form>
<?php
}

{
}
?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
0 votes

I am trying to do override a function which is inside a class in the parent theme via child theme function. Can someone give me the correct way to override parent theme function via child theme function? Is it even possible on a non pluggable class?

The class itself extends from another class and the base class is pluggable.

class Fre_ReviewAction extends AE_Base --> Class attempting to overrite
----------------------------------
if (!class_exists('AE_Base')) {
class AE_Base --> Base class IS PLUGGABLE?
0 votes

I am making a custom plugin for wordpress and i need to create a page in the admin menu. I already have a file called menu_list.php with the following code:

function jps_mail_list_page_entry() {
add_menu_page(
    __('JPS Mailing List'),
    'JPS Mailing List',
    'manage_options',
    'jpsNews_mailinglist',
    'jpsNews_mailing_list',
    'dashicons-email'
);
}
add_action('admin_menu', 'jps_mail_list_page_entry');

function jpsNews_mailing_list() {
    echo 'hello';
}

Now, in the plugin page i have this:

function jpsNews_activate_plugin() {
    include_once(plugin_dir_path(__FILE__).'pages/mailing-list.php');
}
register_activation_hook(__FILE__,'jpsNews_activate_plugin');

Its not working. How can i do it?

...