How Can I delete html tags in excerpts posts on homepage https://ptbo.edu.pl/ ?
I mean only HOMEPAGE (not in categories) because I'm changing this manually in posts editor.
My code looks now:
<?php if ( allium_has_excerpt() ) : ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php endif; ?>
I want to make changes only on the home page
My solution would be to leave the HTML tags but add this CSS to make them unnoticeable:
.home .entry-summary a {
pointer-events: none;
color: #3d3d3d;
}
.home .entry-summary strong {
font-weight: normal;
}
Related
I have the following commands from a wordpress theme.
</head>
<body <?php body_class(); ?>>
<header id="masthead" class="site-header <?php echo ( get_theme_mod( 'panoramic-header-layout', 'panoramic-header-layout-standard' ) == 'panoramic-header-layout-centered' ) ? sanitize_html_class( 'panoramic-header-layout-centered' ) : sanitize_html_class( 'panoramic-header-layout-standard' ); ?>" role="banner">
<?php if ( get_theme_mod( 'panoramic-header-layout', 'panoramic-header-layout-standard' ) == 'panoramic-header-layout-centered' ) : ?>
<?php get_template_part( 'library/template-parts/header', 'centered' ); ?>
<?php else : ?>
<?php get_template_part( 'library/template-parts/header', 'centered' ); ?>
<?php endif; ?>
Now I need to add two logos one is on the left and the other one is on the right.
How to do that?
As mentioned in the comments section, simply add the icons to the HTML section and remove the theme-specific images. Here's a sample showing how this could be done:
HTML part:
<header>
<img class="logo left" src="PATH_TO_LEFT_LOGO.png">
<div class="header-text left">
This may be a title.
</div>
<img class="logo right" src="PATH_TO_RIGHT_LOGO.png">
<br class="header-clear" />
</header>
CSS to align the logo files:
.header-text {
color: white;
margin: 5px;
font-size: 20px;
}
.header-text.left,
.logo.left{
float: left;
}
.logo.right {
float: right;
}
.header-clear {
clear: both;
}
If you don't need the header text, remove the DIV layer and the appropriate rules from the CSS section. It should also be obvious that you will have to replace the paths to the logo images matching your configuration :-)
Here's a fiddle showing the above code.
I added a menu to the footer of my site in functions/footer.php, and it shows up as desired on my home page, but it doesnt show up on any of the Post pages.
here is the website http://www.cultcitychi.com/
Below is my footer.php code
`?>
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<?php // footer menu
wp_nav_menu( array('container_class' => 'menu-footer',
'theme_location' => 'secondary' ) ); ?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
`
You need to add this code at the bottom of your single.php file in order to display the footer on each post page:
<?php get_footer(); ?>
UPDATE:
I checked your website using the developer tools and the footer is present on the posts page but it's not appearing because of a flaw in your CSS. Please add the following CSS at the bottom of your stylesheet and that should solve the problem:
.single.single-thumbnail .site {
height: auto;
}
.single.single-thumbnail .site-footer {
padding-top: 0px;
}
.site-info {
margin: 0px auto;
padding-bottom: 0px;
}
footer#colophon {
z-index: 999;
}
I have made a static blank page that also shows my website's header/sidebar/footer in it. Now what i am trying to do is get rid of the 'style' that my wordpress template css is forcing me to have on the page i am trying to create.
Here is my code:
<?php
/*
* Template Name: My own page!
* Description: I made a page!
*/
require (dirname(dirname( __FILE__ )).'/wp-load.php');
get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( 'featured-content' );
}
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<!-- MY CONTENT!!! -->
Hello2.
<h1> hello.</h1>
<p>hello</p>
<input type="submit" name="connect" value="CONNECT" style="height:52px ; width:136px"/>
<p>hi</p>
<!-- -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php
get_sidebar();
get_footer();
Any help appreciated.
You will need to overwrite the styles which are already in the theme. For example, you can give an id to your submit button like <input type="submit" name="connect" value="CONNECT" id="submitbutton"> and then style it according to your needs using CSS, for example:
input#submitbutton {
height: 52px;
width: 136px;
background: blue;
color: white;
}
Same goes for the <h1> tags. Give an <id> to your <h1> tag like <h1 id="hello"> hello.</h1> and then style it according to your needs using CSS, for example:
h1#hello {
color: black;
font-weight: bold;
font-size: 20px;
}
Use of Developer Tools over here will help you quite a lot in order to see how an element would look with your desired styles before actually making any changes to its CSS.
you will need to use something like
get_header('custom-header');
And use a custom header file to only load the stuff you want. You may need to create a custom function to override the scripts included by the theme...
Really struggling to understand this problem, any ideas are welcome
I have a carousel of images and all have rollovers that appear in every browser but IE, (testing in IE8 at the mo)
Live site
http://www.warface.co.uk/clients/warface.co.uk/testv2
click top red box to reveal
To add to the confusion rollover appears when an image isnt present
HTML
<div class="anyClass">
<ul><?php query_posts('category_name=project'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li><div class="project-thumb caption">
<div class="cover boxcaption">
<div class="content">
<h2><?php the_title() ?></h2>
<a class="view-project" href="<?php the_permalink() ?>">View Project</a>
</div><!--content END -->
</div><!-- cover boxcaption END -->
</div><!-- project-thumb caption END -->
<?php $description = get_post_meta($post->ID, "project-thumb", $single = true);
if($description !== '') { echo $description; } ?></li>
<?php endwhile; endif;
wp_reset_query(); ?>
</ul></div><!-- anyClass END -->
CSS
.project-thumb { /* -- This is the hit area -- */
overflow: hidden;
width:499px;
height:337px;
display:block;
top:0px;
right:0px;
position: absolute;
}
.project-thumb .boxcaption { /* -- This is the sliding area -- */
background: #f7c923;
position: absolute;
width:499px;
opacity: .9; /* For IE 5-7 */
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90); /* For IE 8 */
-MS-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
}
.caption .boxcaption {
height:100%;
left: 100%;
}
.project-thumb .content {
width:400px;
display:block;
margin:0 auto;
top:34%;
position: relative;
display:block;
}
** -- EDIT -- **
JS
$('.project-thumb.caption').hover(function(){
$(".cover", this).stop().animate({left:'0%'},{queue:false,duration:0}); //Position on rollover
},function() {
$(".cover", this).stop().animate({left:'100%'},{queue:false,duration:0}); //Position on rollout
});
The problem is that in IE you cannot hover over an empty div and have the mouseover event fire. You'll notice in developer tools that if you select the div element it just selects the image and completely bypasses the overlayed div.
There are two ways around this: you can set the "project-thumb" div to have a transparent background (using css3 or a transparent image) or give it a border. I was able to test this in your page in IE and it works just fine now. Look here for more info on being able to hover over an empty div in IE.
I am new to css and coding, but I am wondering in the below code where it is pulling the imiage from the post. I dont want this page pulling images...it is pulling imiage from blog post and pages...is there a code I can place to make sure it does not pull the image?
thanks
<style>
#para1{ text-align:center;}
.bdr_blb{
border:#000000 solid 4px;
height:70px;
background:#cccccc;
text-align:center;
font-size:14px; font-weight:700;}
.light32{ font-size:32px;}
.bggrey{ background:#cccccc;}
.light18{ font-size:18px;}
#bedroom4{
background:#cccccc;
}
.heading_div{float:left;}
.entry-content{float:left;}
.thumnail_col ul li {
float: left;
list-style: none outside none;
margin-right: 15px;
}
.thumnail_col ul li img{background:none; border:none;}
</style>
?>
<div id="container">
<div id="" role="main">
<?php $args = array( 'category_name' => 'lease', 'orderby' => 'title' ,'order' => 'ASC' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
if ($count==1)
{
echo "<tr>";
}
?>
<td><div class="lease">
<div class="heading_div"><h2 class="entry-title"><strong><u>
<?php
echo ''.$loop->post->post_title.'';
?>
</u></strong></div></h2>
<div class="entry-content">
<div class="desc">
<?php
the_content();
?>
</div>
</div></div></td>
<?php
if($count==$number_of_columns)
{
echo "</tr>";
$count=0;
}
$count++;
endwhile;
?>
</div><!-- #content -->
</div><!-- #container -->
You need to find where the function the_content(); is defined. Somewhere, look for:
function the_content()
Inside of that function definition is possibly code that echo's out an <img> tag. Delete or comment out that portion of the code. Until we see the definition of that function though, we cannot be sure of other consequences of modifying it.
UPDATE
This won't prevent the image from being loaded by the browser, but will prevent it from being actually displayed by the browser. It's easier than tracking down the function definition to modify PHP.
Inside the <style> tag at the top of your posted code above, add this (it can go anywhere in there):
.entry-content img {display: none;}
This simply tells the CSS no to show the image even though the browser has downloaded it.