Unverified Commit fba11466 authored by Thorsten Eggeling's avatar Thorsten Eggeling Committed by GitHub
Browse files

Add files via upload

parent a290c7b4
<?php
add_action('wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_filter( 'body_class','my_body_classes' );
function my_body_classes( $classes ) {
if ( is_category() ) {
$classes[] = 'template-full-width';
}
if ( is_archive() ) {
$classes[] = 'template-full-width';
}
if ( is_page_template( 'templates/template-software-full-width.php' )) {
$classes[] = 'template-full-width';
}
return $classes;
}
?>
/*
Theme Name: TwentyTwenty Child
Description: TwentyTwenty Child Theme
Template: twentytwenty
Version: 1.0.0
*/
.entry-content h2 {
margin: 1rem auto 1.5rem;
}
.singular .entry-header {
padding: 0.5rem 0;
}
.post-inner {
padding-top: 1rem;
}
.header-inner {
padding: 1.15rem 0;
}
.sidebar {
font-family: NonBreakingSpaceOverride, "Hoefler Text", Garamond, "Times New Roman", serif;
}
.info-box {
width:300px;
background:#E9D9B7;
}
.info-text {
padding:5px 15px 5px 15px;
}
<?php
/**
* The default template for displaying content
*
* Used for both singular and index.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since 1.0.0
*/
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php
get_template_part( 'template-parts/entry-header' );
if ( ! is_search() ) {
get_template_part( 'template-parts/featured-image' );
}
?>
<div class="post-inner <?php echo is_page_template( 'templates/template-full-width.php' ) ? '' : 'thin'; ?> ">
<div class="entry-content">
<div class="wp-block-columns">
<div class="wp-block-column" style="flex-basis:66.66%">
<?php
if ( is_search() || ! is_singular() && 'summary' === get_theme_mod( 'blog_content', 'full' ) ) {
the_excerpt();
} else {
the_content( __( 'Continue reading', 'twentytwenty' ) );
}
?>
</div> <!-- block column -->
<div class="wp-block-column" style="flex-basis:33.33%">
<div class="sidebar">
<div class="info-box">
<div class="info-text">
<b>Betriebssysteme:</b>
<br/>
<?php the_field('betriebssysteme'); ?>
<br/>
<b>Sprache:</b>
<br/>
<?php the_field('sprache'); ?>
<br/>
<b>Download:</b>
<br />
<a href="<?php the_field('download'); ?>"> <?php the_field('download'); ?></a>
<b>Version:</b>
<br/>
<?php the_field('version'); ?>
<br/>
<b>Update:</b>
<br/>
<?php the_field('update'); ?>
<br/>
<b>Softwareart:</b>
<br/>
<?php the_field('softwareart'); ?>
<br/>
<b>Preis:</b>
<br/>
<?php the_field('preis'); ?>
</div> <!-- info-text -->
</div> <!-- info-box -->
</div> <!-- sidebar -->
</div> <!-- block column -->
</div> <!-- block columns -->
</div><!-- .entry-content -->
</div><!-- .post-inner -->
<div class="section-inner">
<?php
wp_link_pages(
array(
'before' => '<nav class="post-nav-links bg-light-background" aria-label="' . esc_attr__( 'Page', 'twentytwenty' ) . '"><span class="label">' . __( 'Pages:', 'twentytwenty' ) . '</span>',
'after' => '</nav>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
edit_post_link();
// Single bottom post meta.
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
if ( is_single() ) {
get_template_part( 'template-parts/entry-author-bio' );
}
?>
</div><!-- .section-inner -->
<?php
if ( is_single() ) {
get_template_part( 'template-parts/navigation' );
}
/**
* Output comments wrapper if it's a post, or if comments are open,
* or if there's a comment number – and check for password.
* */
if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) {
?>
<div class="comments-wrapper section-inner">
<?php comments_template(); ?>
</div><!-- .comments-wrapper -->
<?php
}
?>
</article><!-- .post -->
<?php
/**
* Template Name: Full-width Software-Template
* Template Post Type: post, page
* Description: Software post template
*/
//acf_form_head();
get_header();
?>
<main id="site-content" role="main">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content-software', get_post_type() );
}
}
?>
</main><!-- #site-content -->
<?php get_template_part( 'template-parts/footer-menus-widgets' ); ?>
<?php get_footer(); ?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment