Adding blog title and text on blog index page renew stack

Hi there,

I’m trying to customise my idea page and I’ve sort of succeed, just need a little help to fix some minor details.

What I’m trying to achieve is this (a normal page):

And what I have so far is this:

Can you help me remove the lines and add the same spacing between title and text?

Here is the code I’ve added to the functions.php of my child theme:

/*blog*/

function add_my_title() {   
    if(is_home()){
    ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>
    <p class="p-landmark-sub"><span><p class="has-drop-cap"> A central aspect at Copenhagen Furnishing is the dialogue with the customer. To be able to create spaces that people love to live in, you need to know what they want and how they think. This is why we talk to our customers for as long as needed. To make sure that their personalities is reflected in our work, and their ideas is not forgotten in the process of work. Please feel free to review some of our projects below.</p></span></p>
  </header>
<?php }
	
	
if ( is_category()) { ?>

  <?php

  $meta     = x_get_taxonomy_meta();
  $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
  $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';

  ?>

  <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
  </header>
  <?php
}}
add_action( 'x_after_view_global__slider-below', 'add_my_title', 10 );

Regards,
Carina

Hi Carina,

Thanks for writing in! Blog title can be changed by head over to X -> Theme Options -> Renew -> Blog Options area.

To add a description, you need to do a template customization by following this guide here (https://theme.co/apex/forum/t/alternat-index-titles-for-blog-post-pages/9737/4?u=mldarshana).

Locate the below code where it displays Blog Title. Below that <h1> tag, you can add your description.
<h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>

Hope that helps.

Hi there,

Thanks for getting back to my, however it is not what I’m asking for. Apologies, if I was not clear.

I’m customising my blog (projects) to look like the rest of the pages. I’m almost there just need a little help to fix the last details. I’ve created a login for you to take a look, as the website is not public yet.

Regards,
Carina

Hi Carina,

I have checked both of your pages, but I could not see any lines as per your screenshots.

Screenshot 1:

Screenshot 2:

Could you please try clearing all of your caches and re-test this issue further by following this guide (https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/).

Let us know how it goes.
Thanks!

No, I managed to fix the code in the mean time :slight_smile:

Glad to hear that. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.