5 Disperate Questions

Hi team Apex,

Hope you’re doing well and staying sane in these crazy times! :slight_smile:

I have some questions regarding my X theme (Ethos) website and hope you can assist. Please find below:

  • I’d like to change the background colour of all of my pages, including the background colour of the blog post overview and of all the blog post pages, to one colour but if I do so through X > theme options > layout & design > background color and by adding the code below, it doesn’t work:

“.x-container.main:not(.x-row):not(.x-grid):before {background-color: transparent;”

Help — what am I not doing correctly?

  • I’m currently using a slider with images on my homepage/blogpage above the navigation menu, but want to use 1 static image on my ‘about’ en ‘contact’ pages. Is this possible, and if yes, how?

  • Currently the size of the images on my blog index page depend on the length of the title of the blog post (setting = make featured images of this post fullwidth on the blog index page). Can I change this so that all the images on my blog index page are the same size, no matter how long the title.

  • Currently the text in the button in each blog post on my blog index page is “VIEW POST”. Can I change the text in the buttons of all the blog posts at one time? For example to “VIEW HERE”.

  • If you now click on a blog post in the blog post index, it of course links visitors to the page of that specific blog post. Is it possible to link visitors to a different website when clicking on a specific blog post - and not to the blog post itself?

Thanks for all the support - much appreciated!

Ferdy

Hello Fredy,

Thank you for the very detailed post information.

1.) By default, the Ethos stack has a first white background color in the content area portion. Regretfully there isn’t any setting in the theme to override the background color. It is using this built-in css:

.x-container.main:not(.x-row):not(.x-grid):before {
  background-color: #fff;
}

Feel free to override this css and add your custom css in X > Theme Options > Custom CSS.

2.) Are you referring to the Post Slider in the blog index? This slider will only display posts and will only be displayed in the blog index or in the archive pages. If you are looking to add a banner slider in your inside pages, I would recommend that you check our this documentation on how you can integrate a slider on a page instead. Kindly check this page: https://theme.co/docs/append-sliders-to-your-header

3.) The featured images, (when set to make featured images of this post fullwidth on the blog index page), were used as a background image. Background images only depends on the height of the post container. The post container depends on the height of the elements inside it which in your case is the post title. This is why the longer the post title, the height of the post container changes. The only way that you can control the height of the container is by using a custom CSS. I can see that you already added a custom css:

.blog .x-main .hentry .entry-thumb.featured, 
.search .x-main .hentry .entry-thumb.featured, 
.archive .x-main .hentry .entry-thumb.featured {
    min-height: 275px;
}

275 pixels just do not cover it. I would recommend that you increase it to at least 375px instead.

4.) The “View Post” were hard coded in the template files. If you want to change it to another text, you will have to modify the file. Since you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/ETHOS/_INDEX-FEATURED.PHP
// -----------------------------------------------------------------------------
// Featured content output for the index pages.
// =============================================================================

$index_layout           = get_post_meta( get_the_ID(), '_x_ethos_index_featured_post_layout',  true );
$class                  = ( $index_layout == 'on' ) ? 'featured' : '';
$background_image_style = x_ethos_entry_cover_background_image_style();
$categories             = x_ethos_post_categories();

?>

<a href="<?php the_permalink(); ?>" class="entry-thumb <?php echo $class; ?>" style="<?php echo $background_image_style; ?>">
  <?php if ( $index_layout == 'on' && ! is_single() ) : ?>  
    <span class="featured-meta"><?php echo $categories; ?> / <?php echo get_the_date( 'F j, Y' ); ?></span>
    <h2 class="h-featured"><span><?php the_title(); ?></span></h2>
    <span class="featured-view"><?php _e( 'View Post', '__x__' ); ?></span>
  <?php else : ?>
    <span class="view"><?php _e( 'View Post', '__x__' ); ?></span>
  <?php endif; ?>
</a>

Please do not forget to change the “View Post” to "View Here"

3] Save the file named as _index-featured.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/ethos/

You will have to create the folder path since it does not exist yet in your child theme.

5.) Linking the posts to external sites requires custom development which is beyond the scope of our support. Perhaps this link can help you:

Hope this helps.

Hi Ruenel,

Thank you as well for your very detailed reply; hope you’re having a great weekend :slight_smile:

Screenshot 2020-05-03 at 15.10.16

  1. I’m a bit confused in regard to this one - so you’re saying that there is no way I can get the white background to be the same grey as on the sides? And also not the background on the blog post index with the ethos theme?

  2. I’d like to keep the post slider in the blog index page as it is right now but thought it would be nicer to have a static image above the navigation menu in my “about” and 'contact" pages.

3, 4 & 5) Awesome - thanks. Will work on these ones :slight_smile:

Regards,
Ferdy

Hello Fredy,

There is no out of the box setting so change the background colors of the areas you mentioned but it is definitely possible to change them by using a bit of custom CSS which @ruenel provided:

 .x-container.main:not(.x-row):not(.x-grid):before {
  background-color: #fff;
}

Please change the background color value in the code above to your preferred color.

A quick option for this would be to use Revolution Slider which is one of the bundled plugins with X and Pro.

Kindly install and active it then make the slider for the about and the contact page. You may just have one slider per slider and as per your requirement, that should be the image you want to use in above the navigation area.

Once you created the slider, edit the pages in question then click on the cog icon in Cornerstone.

Wordpress_Designer_Bangkok_-Content-_X

Then go to the Page Settings and set the sliders you have create in the Slider Settings: Above Masthead option.

Hope this helps.

Hi Jade,

I’m sorry, but if I add the custom CSS below, nothing changes…

.x-container.main:not(.x-row):not(.x-grid):before {
background-color: rgb(222, 220, 220) ;
}

What am I doing wrong :frowning:

Hi Ferdy,

The output should look like this if you added the code correctly:

Try updating it to:

.x-container.main:not(.x-row):not(.x-grid):before {
    background-color: rgb(222, 220, 220) !important ;
}

If the code is still not working, perhaps there is a CSS error in codes you currently have. To verify that, please copy all the codes that are in the Global CSS and paste it here.

It should provide some information if there are any CSS error that is causing the issue that you have to fix so that the CSS codes will work.

In case you are still not able to get it sorted, please provide us with the URL of the site in question.

Hi Jade,

Unfortunate it doesn’t fix the problem.

The URL is ferdyjobs.com.

Thanks for looking into this!

Ferdy

Hello Ferdy,

Since this is a box layout, you might need to reset white background of the box as define in stack file CSS. Look at this guide:

See this: https://screencast-o-matic.com/watch/cYhi11gILn

Hope this helps.

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