Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Homepage title problem WordPress

  • SOLVED

Hi,

I have two small problems on my blog www.lovefrance.info.

<strong>Problem 1</strong>

I'd like to be able to delete the title of the page if I want to on any page. For some reason the theme I use doesn't allow this. What code do I need to get rid of it? Custom fields don't work either in the page.

On one page, I just want to go right into the content, with no breadcrumbs, no title, no page URL, just the content.

<strong>Problem 2</strong>

When I choose to have a static page in the reading settings of the WP blog, the introduction to the blog (that is situated at the top of the homepage when the blog is selected as the homepage, see image enclosed) no longer appears. Please see the two images to compare.

I'd like to choose a static page (see Problem 1) and but still have the introductory text.

Kind regards

Joss

Answers (5)

2014-04-21

zebra webdesigns answers:

Hello Joss

My suggestion is to control with CSS, that way you retain the original content and show the only content you want to provide to your viewers

When you look at the body class , it will be supplied along with the id of the page.
so you can use that unique class to control the display by providing display:none css property.

For example to hide the title in the http://www.lovefrance.info/coming-to-france/ page

following is the css

body.page-id-119 .post_top h1{display:none;}



for home page it will be body.home

My solutions is in an assumption you want it to hide from Users not from search engines.
You get more control and this will be a future proof solution.

Have a great day and let me know if you need any clarifications.


Joss Frimond comments:

Hi Zebra,

Your code worked great for the home page thanks. That solves Problem 1, but not Problem 2 - I don't have the introduction text.

See www.lovefrance.info.

Thanks

Joss


zebra webdesigns comments:

Hello Joss here is the solution for you.

add the following code in the end of functions.php


add_filter( 'the_content', 'my_the_content_filter', 20 );

function my_the_content_filter( $content ) {

if ( is_front_page() ){
ob_start(); ?>
<h1 style="text-align: center;"><span style="color: #333399;">Register now for my free video that will explain the secrets about why learning French is so much harder for an English speaker compared to any other European language and discover a special offer of the best French learning solution out there.</span></h1>
<h2 style="text-align: center;">Enter your name and email below to confirm IMMEDIATE access</h2>

Add more content here.......


<?php
$content = ob_get_contents().$content;
ob_end_clean();
}
return $content;
}



replace the content with the actual content of yours.
and one more thing you are using the parent theme directly. Its not advisable you need to create the child theme
to retain any changes when you update the theme.

I have tested my code with the bonpress theme itself.
If you need more assistance in getting it to better shape. Let me know I can personally do the customization and get the things done for you.
Have a great day mate


zebra webdesigns comments:

you can check the screenshot in the following link

[[LINK href="http://awesomescreenshot.com/00e2oofj23"]][[/LINK]]


zebra webdesigns comments:

http://awesomescreenshot.com/00e2oofj23


Joss Frimond comments:

No I don't think that's it. I want the intro at the top in this image. it's part of the bon press theme. I have to add in the photo and the text in a specific part of the theme options.

See jpeg