Skip to content

Commit

Permalink
Atom Blog
Browse files Browse the repository at this point in the history
  • Loading branch information
atomjoy committed Oct 3, 2024
1 parent 85b271f commit b4e4b25
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 39 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

// Wyświetlaj błędy
define('WP_DEBUG', true);
define('WP_DEBUG', false); // true or false
```

## Włącz boczny panel w functions.php
Expand All @@ -45,6 +45,26 @@ define('WP_DEBUG', true);
$show_single_sidebar = true;
```

## Zmiana strony głównej

Stronę domową można zmienić na dwa sposoby.

### W panelu admina

Ustaw w panelu statyczną stronę główną (Ustawienia > Czytanie).

### Zmiana plików szablonu

Skopiuj **front-page-disabled.php** do **font-page.php** szablonu i dodaj odpowiednie treści.

```sh
# Linux
cp front-page-disabled.php front-page.php

# Win
copy front-page-disabled.php front-page.php
```

## Koszt szablonu

- Cena: 250 PLN + VAT
Expand All @@ -54,8 +74,8 @@ $show_single_sidebar = true;

```sh
index.php – główny szablon i plik strony wymagany do poprawnego działania witryny.
front-page.php – szablon statycznej strony głównej w WordPress (nadpisuje index.php, home.php).
home.php – domyślny szablon WordPress prezentujący ostatnie wpisy na stronie głównej (nadpisuje index.php).
front-page.php – szablon statycznej strony głównej w WordPress (nadpisuje index.php, home.php).
single.php – szablon pojedynczego wpisu w WordPress.
single-{post_type}.php – szablon pojedynczego wpisu w WordPress w niestandardowej taksonomii.
page.php – szablon pojedynczej podstrony w WordPress (nadpisuje index.php).
Expand Down
Binary file modified atom.zip
Binary file not shown.
24 changes: 22 additions & 2 deletions atom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

// Wyświetlaj błędy
define('WP_DEBUG', true);
define('WP_DEBUG', false); // true or false
```

## Włącz boczny panel w functions.php
Expand All @@ -45,6 +45,26 @@ define('WP_DEBUG', true);
$show_single_sidebar = true;
```

## Zmiana strony głównej

Stronę domową można zmienić na dwa sposoby.

### W panelu admina

Ustaw w panelu statyczną stronę główną (Ustawienia > Czytanie).

### Zmiana plików szablonu

Skopiuj **front-page-disabled.php** do **font-page.php** szablonu i dodaj odpowiednie treści.

```sh
# Linux
cp front-page-disabled.php front-page.php

# Win
copy front-page-disabled.php front-page.php
```

## Koszt szablonu

- Cena: 250 PLN + VAT
Expand All @@ -54,8 +74,8 @@ $show_single_sidebar = true;

```sh
index.php – główny szablon i plik strony wymagany do poprawnego działania witryny.
front-page.php – szablon statycznej strony głównej w WordPress (nadpisuje index.php, home.php).
home.php – domyślny szablon WordPress prezentujący ostatnie wpisy na stronie głównej (nadpisuje index.php).
front-page.php – szablon statycznej strony głównej w WordPress (nadpisuje index.php, home.php).
single.php – szablon pojedynczego wpisu w WordPress.
single-{post_type}.php – szablon pojedynczego wpisu w WordPress w niestandardowej taksonomii.
page.php – szablon pojedynczej podstrony w WordPress (nadpisuje index.php).
Expand Down
9 changes: 9 additions & 0 deletions atom/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,26 @@ iframe {
overflow: hidden;
}

.page-front {
position: relative;
float: left;
width: 100%;
height: auto;
}

.page-custom {
position: relative;
float: left;
width: 100%;
height: auto;
}

.page-container {
margin: 50px auto;
width: 90%;
max-width: 1280px;
min-height: 50vh;
height: auto;
}

ul {
Expand Down
25 changes: 25 additions & 0 deletions atom/front-page-disabled.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
get_header();

get_template_part('include/body', 'header');
?>

<div class="homepage">
<section class="section section-top">
TOP_SECTION
</section>

<section class="section section-content">
CONTENT_SECTION
</section>

<section class="section section-last">
LAST_SECTION
</section>
</div>

<?php
get_template_part('include/body', 'footer');

get_footer();
?>
10 changes: 0 additions & 10 deletions atom/front-page.php

This file was deleted.

2 changes: 1 addition & 1 deletion atom/functions/change-title.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
add_filter('wp_title', 'change_title', 100);

// Add wp_title() in header.php
function change_title($title) {
function change_title($title = '') {
global $post;

if (is_home()) {
Expand Down
6 changes: 5 additions & 1 deletion atom/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php wp_title(); ?></title>
<?php
// Error with static page
// echo '<title>' . wp_title() . '</title>';
?>
<title><?php change_title(); ?></title>
<meta name="description" content="<?php echo bloginfo('description'); ?>">

<!-- Favicon -->
Expand Down
11 changes: 10 additions & 1 deletion atom/index.php
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
INDEX PAGE
<?php
get_header();

get_template_part('include/body', 'header');

get_template_part('include/body', 'main-front');

get_template_part('include/body', 'footer');

get_footer();
40 changes: 19 additions & 21 deletions atom/page-about-us.php → atom/page-contact-us.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<!-- About Us Page -->
<?php
get_header();

get_template_part('include/body', 'header');
?>

<div class="page-custom">
<div class="page-container">
<h1><?php the_title(); ?></h1>
<?php
the_content();
get_contact_form();
?>
</div>
</div>

<?php
get_template_part('include/body', 'footer');

get_footer();
<!-- About Us Page -->
<?php
get_header();

get_template_part('include/body', 'header');
?>

<div class="page-custom">
<div class="page-container">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php get_contact_form(); ?>
</div>
</div>

<?php
get_template_part('include/body', 'footer');

get_footer();
?>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Template Name: Contact Form
* Template Name: Custom Contact Form
* Template Post Type: post, page
*
* @package WordPress
Expand Down
25 changes: 25 additions & 0 deletions atom/templates/front-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/**
* Template Name: Front Page
* Template Post Type: post
*
* @package WordPress
* @subpackage Atom Blog
* @since Atom Blog 2.0
*/

get_header();

get_template_part('include/body', 'header');
?>

<div class="page-front">
<?php the_content(); ?>
</div>

<?php
get_template_part('include/body', 'footer');

get_footer();
?>

0 comments on commit b4e4b25

Please sign in to comment.