Practical 5 10
Practical 5 10
Read More, Formatting Date and Time, Finding CSS Styles, Creating
Individual Pages, Uploading Files, Using WordPress Themes, Templates,
Template Tags, Template Hierarchy, Validating a Website, Know Your
Sources, WordPress Site Maintenance
In this practical guide, we will focus on essential WordPress skills tailored for college
students. Whether you're building a personal blog, a portfolio site, or an academic project,
mastering these WordPress essentials will empower you to create and manage
professional-quality websites.
1. Read More:
Learn how to use the "Read More" tag in WordPress to control the excerpt length displayed
on your blog post archive pages. This feature allows you to provide a teaser of your content
while encouraging visitors to click through to read the full post.
2. Formatting Date and Time:
WordPress offers built-in functions for formatting date and time according to your
preferences. Explore how to use functions like the_time() and get_the_date() to display
dates and times in various formats within your WordPress themes and templates.
Customizing the appearance of your WordPress site often requires modifying CSS styles.
Discover how to locate and modify CSS styles using browser developer tools or by
inspecting your theme's CSS files. Experiment with making changes to fonts, colors, layouts,
and more to personalize your site's design.
4. Creating Individual Pages:
WordPress allows you to create individual pages to showcase specific content, such as an
"About Me" page or a contact form. Learn how to create new pages, add content using the
WordPress editor, and organize them within your site's navigation menu for easy access.
5. Uploading Files:
WordPress enables you to upload various file types, including images, documents, and
multimedia files, to enhance your content. Practice uploading files through the WordPress
media library and embedding them into your posts or pages to enrich your website's visual
and interactive elements.
Explore the vast selection of WordPress themes available and learn how to install, activate,
and customize them to suit your site's style and purpose. Experiment with different
themes' layouts, color schemes, and customization options to achieve the desired look and
feel for your website.]
7. Templates, Template Tags, and Template Hierarchy:
Gain an understanding of WordPress template files, template tags, and the template
hierarchy, which govern how WordPress renders different types of content. Learn how to
create custom templates, use template tags to display dynamic content, and leverage the
template hierarchy to control the layout of your site's pages.
8. Validating a Website:
Ensure your WordPress site adheres to web standards and best practices by validating its
HTML, CSS, and accessibility features. Use online validation tools to identify and fix any
coding errors or accessibility issues, ensuring that your site is compatible with different
browsers and devices.
9. Know Your Sources:
When working with WordPress, it's essential to rely on credible sources for information,
themes, plugins, and tutorials. Verify the credibility of sources before integrating any third-
party resources into your site to maintain security and integrity.
Regular maintenance is crucial for keeping your WordPress site secure, up-to-date, and
performing optimally. Familiarize yourself with essential maintenance tasks, such as
updating WordPress core, themes, and plugins, performing backups, monitoring security
vulnerabilities, and optimizing performance for a smooth user experience.
The objective of this practical session is to understand and implement the integration of
PHP, MySQL, and WordPress. By the end of this practical, you should be able to:
Requirements:
Prerequisites:
Before starting this practical, ensure the following steps are completed:
Procedure:
php
Copy code
<?php
/**
* Description: A custom plugin for integrating PHP and MySQL with WordPress.
* Version: 1.0
*/
Inside your custom plugin file (custom-plugin.php), add PHP code to establish a connection
to the MySQL database. You can use the mysqli_connect() function for this purpose.
Example:
$host = 'localhost';
$username = 'root';
$password = '';
$database = 'wordpress';
// Check connection
if ($mysqli->connect_error) {
die("Connection failed: " . $mysqli->connect_error);
Once the database connection is established, you can perform various database operations
like querying, inserting, updating, and deleting data.
Use appropriate PHP functions to execute SQL queries and handle the results. For
example:
$result = $mysqli->query($query);
if ($result) {
} else {
$mysqli->close();
Step 5: Testing
1. Test your custom plugin thoroughly to ensure all functionalities work as expected.
2. Debug any issues encountered during testing and make necessary adjustments to
your code.
Practical - 7
Requirements:
1. Access to a WordPress website (either self-hosted or on a web hosting
service).
2. Basic understanding of WordPress administration and plugin installation.
3. Moodle installation package downloaded from the official Moodle website
(https://moodle.org/).
Prerequisites:
Before beginning the practical session, ensure the following prerequisites are met:
Procedure:
Step 1: Install Moodle Plugin for WordPress
1. After activating the Moodle Plugin for WordPress, navigate to Settings >
Moodle Integration in the WordPress dashboard.
2. Enter the Moodle URL, Moodle service name, and other required details to
configure the integration.
3. Save the changes once the configuration is complete.
The objective of this practical exercise is to guide you through the process of setting up a
database schema for a Moodle site after the installation of Moodle. You will learn how to
understand the data requirements of Moodle and design a database schema to support its
functionalities.
Requirements:
Procedure:
2. Identify other data entities and their relationships as per Moodle's functionalities.
Step 2: Designing the Database Schema
1. Create a database schema using a tool like MySQL Workbench or draw it manually.
2. Identify the tables needed to store the required data and define their structure
(fields, data types, constraints).
3. Establish relationships between tables using foreign keys to ensure data integrity.
4. Normalize the database schema to minimize redundancy and improve efficiency.
5. Consider indexing key fields for faster data retrieval.
1. Access your MySQL server either through command-line interface or a GUI tool like
phpMyAdmin.
2. Create a new database for your Moodle site.
3. Execute SQL scripts to create tables based on the designed schema.
4. Test the database schema by inserting sample data and performing basic CRUD
(Create, Read, Update, Delete) operations.
5. Ensure that the database design is efficient and optimized for performance.
1. Test your Moodle site thoroughly to ensure all functionalities are working as
expected.
2. Conduct usability testing to ensure a smooth user experience.
3. Backup your Moodle site and database regularly to prevent data loss.
4. Once testing is complete, deploy your Moodle site for users to access.
Practical – 9
Design Site appearance, Front page, Front page settings, My Moodle, User
profiles, Navigation, Course list, Themes, Theme settings, Header and
footer, Language settings, Using web services, Publishing a course, Blogs,
RSS feeds
Objective:
The objective of this practical exercise is to guide you through the customization and
management of various features of a Moodle site. You will learn how to design the site
appearance, configure front page settings, manage user profiles, set up navigation,
customize themes, utilize web services, publish courses, manage blogs and RSS feeds, and
more.
Requirements:
Procedure:
1. Adjust front page settings to control what users see when they first access the site.
2. Set up featured courses, site news, and other relevant information to display
prominently.
3. My Moodle:
5. Navigation:
1. Customize the header and footer of your Moodle site to include important links,
contact information, and copyright notices.
2. Modify HTML and CSS templates to achieve the desired layout and styling.
9. Language Settings:
1. Enable blogs for users and courses to encourage collaboration and reflection.
2. Set up RSS feeds to allow users to subscribe to site updates and course
announcements.
Practical – 10
The objective of this practical exercise is to guide you through the process of managing
authentication methods in Moodle. You will learn how to configure manual accounts,
enable the "No login" option, and set up email-based self-registration for user accounts.
Requirements:
Procedure: