Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • ok, now I have to figure out how to make the code apply to mobile, so there’s that…

    Hi!

    Wanted to share what I found in case anyone finds this post and has the same question! Since the posts page is using the index.php template, I copied that into my child theme. Then I add this to the top of the template, immediately under the get_header(); ?>:

    <div id=”posts-page” class=”hero with-featured-image”>
    <div class=”hero-wrapper”>
    <h1 class=”page-title”>Blog</h1>
    </div>
    </div>??????????

    This makes the image the featured image from the last blog post, so I added this css to my stylesheet:

    #posts-page{background-image: url(https://…insert url for image…jpg?resize=1230%2c1230);
    }

    This makes the image a static image and whatever you want it to be!

    I am very new to coding, so no guarantees there’s not something wrong here, but it seems to be working!

    Hi Darcey,

    I know this is resolved, but I am looking for the exact same thing! Any way you can share the custom page template for the blog posts page?

    Thanks in advance!

    Thread Starter xoptopinope

    (@xoptopinope)

    The css files are style.css, rtl.css, and editor-style.css. I just copied rtl and editor-style into my child theme folder and put:
    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }
    ?>
    into my function file for now. If anyone knows how to enqueue the other files or if I’m even supposed to, let me know!

    Thanks.

    Thread Starter xoptopinope

    (@xoptopinope)

    I entered this into my functions file for no other reason than I found it somewhere else:

    <?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles_viewpoint’ );
    function theme_enqueue_styles_viewpoint() {
    wp_enqueue_style(
    ‘parent-style’,
    get_template_directory_uri() . ‘/style.css’
    );

    wp_enqueue_style(
    ‘anthemize’,
    dirname(__FILE__) . ‘/../../../../resources/styles/anthemize.css’
    );

    }

    It almost worked, but not quite.

    Thread Starter xoptopinope

    (@xoptopinope)

    Ok, I fixed everything and found the files…. soon I will be an expert! ??

    Thread Starter xoptopinope

    (@xoptopinope)

    Now I broke something…… thought I almost had it and then when I tried to insert the this:<?php
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }
    ?>
    into the function file, it said this:
    Fatal error: Cannot redeclare theme_enqueue_styles() (previously declared in /home/content/p3pnexwpnas08_data02/38/3220338/html/wp-content/themes/responsive-childtheme-master/functions.php:4) in /home/content/p3pnexwpnas08_data02/38/3220338/html/wp-content/themes/responsive-childtheme-master/functions.php on line 19

    even when I deleted what I pasted in, it continued to say it to the point where, I can’t even log into my wordpress anymore. I realize I should have changed “responsive” to edin which is what I’m using, but now everything is ruined and I dont’ know what to do.

Viewing 7 replies - 1 through 7 (of 7 total)