Change pointer style for <a> without href value - html

The page linked here contains a row of 3 images that display text on mouse-over. I want to stick to the way I did it with without specifying a value to href attribute because I don't want the tiles linked anywhere. I just want some text to show when cursor moves over the image. I'm looking for help to
To stop the image from sending the user to top of the page when the hover-over text is clicked. Or make the hover-over unclickable.
Changed pointer style to normal arrow style when mouse moves over the image.
Here is the code written for this particular section:
<!-- START SEAMLESS GIFTING FOR EVERY OCCASION -->
<?php if( have_rows('seamless_gifting') ): while( have_rows('seamless_gifting') ): the_row();
$title_text = get_sub_field('title_-_text');
?>
<div class="seamless-gifting front-page-row" id="row2">
<div class="wrap-x">
<div class="inside">
<div class="row seamless-gifting-title"><?php echo $title_text; ?></div>
<div class="row compact">
<?php if ( have_rows( 'occasion_column' ) ) : while ( have_rows( 'occasion_column' ) ) : the_row();
$image = get_sub_field( 'gift_-_image' );
$title_text = get_sub_field( 'title_-_text' );
$hover_text = get_sub_field( 'hover_-_text' );
?>
<div class="col col-xs-12 col-sm-6 col-lg-4">
<a href="#" class="block h-100 bg-white-base transition" target="" title="">
<div class="relative image">
<?php if($hover_text): ?>
<div class="textarea relative pt pb pl pr no-touch select-none">
<div class="bg-white-base pl pr">
<article class="center-xs"><?php echo $hover_text; ?></article>
</div>
</div>
<?php endif; ?>
<?php if($image): ?>
<div class="object-cover-wrap">
<picture>
<source media="(max-width: 360px)" srcset="<?php echo($image['sizes']['xsmall']); ?>">
<source media="(max-width: 640px)" srcset="<?php echo($image['sizes']['small']); ?>">
<source media="(max-width: 1024px)" srcset="<?php echo($image['sizes']['medium']); ?>">
<source srcset="<?php echo($image['sizes']['large']); ?>">
<img src="<?php echo($image['sizes']['large']); ?>" alt="<?php echo $image['alt']; ?>" />
</picture>
</div>
<?php endif; ?>
</div>
</a>
<div class="pt pb pl pr center-xs title transition">
<h3 class="mb0 h5 transition">
<?php echo $title_text; ?>
</h3>
</div>
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
<!-- END SEAMLESS GIFTING FOR EVERY OCCASION -->
Below is the image of the section I'm talking about.

From this:
<a href="#" class="block h-100 bg-white-base transition" target="" title="">
Change to this (remove href="#" and add tabIndex="0"):
<a tabIndex="0" class="block h-100 bg-white-base transition">
What href="#" does is, it changes the URl by appending # at the end of the url and that causes the browser to react and in your case it forces a page scroll to the top.
After you remove href, the <a> element will now act like an ordinary inline element like span without keyboard tab capabilities. So you must proceed to add tabIndex="0" to make it tab-able in the case your viewer uses a keyboad.

Related

Get first array data for view, the second data and others to another class view

I have an array data, for example array data like this:
[0, 1, 2, 3, 4];
I want to foreach array data to view. My first array data will place for headline, second data and others will place for list data. This is my view:
<div class="editor-choice">
<div class="headsection">EDITOR’S CHOICE</div>
<!-- Headline Editor Choice -->
<article class="headline-editor-choice">
<a href="https://www.sportstars.id/read/ole-gunnar-solskjaer-pelatih-man-united-terburuk-setelah-era-sir-alex-ferguson-48Gz3V">
<div class="img-headline-editor-choice">
<img src="https://img.sportstars.id/mpi/800//2021/11/48Gz3V/master_94xHM5T8r5_1941_ole_gunnar_solskjaer.jpg"
alt="img-news">
</div>
</a>
<div class="detail-headline-editor-choice">
Liga Inggris
<span class="date">22 November 2021 13:21 WIB</span>
<div class="title-article title-editor-choice-headline">
<a href="https://www.sportstars.id/read/ole-gunnar-solskjaer-pelatih-man-united-terburuk-setelah-era-sir-alex-ferguson-48Gz3V"
class="title" style="-webkit-box-orient: vertical;">Ole Gunnar Solskjaer Pelatih Man United Terburuk
Setelah
Era Sir Alex Ferguson</a>
</div>
</div>
</article>
<!-- List Editor Choice -->
<?php foreach ($editorchoice as $kuy => $val) { ?>
<article class="list-editor-choice">
<div class="img-editor-choice">
<a
href="<?php echo $val['link']; ?>">
<img src="<?php echo image_uri().'/okz/900/'.str_replace("thumb","master",#$val['image_content']); ?>"
alt="img-news">
</a>
</div>
<div class="detail-editor-choice">
<div class="title-article title-editor-choice">
<a href="<?php echo $val['link']; ?>"
class="title" style="-webkit-box-orient: vertical;"><?php echo $val['title']; ?></a>
</div>
<div class="warp-date-article">
<div class="ico-calendar"><img src="<?php echo base_url(); ?>assets/mobile/images/icon/calender.svg">
</div>
<div class="date-article">19 November 2021</div>
</div>
</div>
</article>
<?php } ?>
This is the example of editorchoice data (data from array):
How to make the first array data from $editorchoice to Headline Editor Choice, and second & others data in List Editor Choice?
I use Codeigniter 3
I solved this problem with this code:
<?php if(!empty($editorchoice)):?>
<!-- Editor Choice -->
<div class="editor-choice">
<div class="headsection">EDITOR’S CHOICE</div>
<!-- Headline Editor Choice -->
<article class="headline-editor-choice">
<a href="<?php echo $editorchoice[0]['link']; ?>">
<div class="img-headline-editor-choice">
<img src="<?php echo image_uri().'mpi/800/'.str_replace("thumb","master",$editorchoice[0]['image_content']); ?>" alt="img-news">
</div>
</a>
<div class="detail-headline-editor-choice">
<?php echo #$editorchoice[0]['channel_name']; ?>
<span class="date"><?php echo $editorchoice[0]['timeago']; ?></span>
<div class="title-article title-editor-choice-headline">
<?php echo $editorchoice[0]['title']; ?>
</div>
</div>
</article>
<!-- List Editor Choice -->
<?php $i = 0; foreach ($editorchoice as $key => $value) { ?>
<?php if(!empty($i)):?>
<article class="list-editor-choice">
<div class="img-editor-choice">
<a href="<?php echo $value['link']; ?>">
<img src="<?php echo image_uri().'mpi/800/'.str_replace("thumb","master",$value['image_content']); ?>" alt="img-news">
</a>
</div>
<div class="detail-editor-choice">
<div class="title-article title-editor-choice">
<?php echo $value['title']; ?>
</div>
<div class="warp-date-article">
<div class="ico-calendar"><img src="<?php echo base_url()?>assets/mobile/images/icon/calender.svg"></div>
<div class="date-article"><?php echo #$value['timeago']; ?></div>
</div>
</div>
</article>
<?php endif;?>
<?php $i++; } ?>
</div>
<!-- End Editor Choice -->
Thank you ..

Photos on website only showing in one row, I need to add multiple rows

Why is my code displaying multiple rows instead of 1?
I can upload any number of photos to my site, but it only displays 4 photos across, the 4 most recently uploaded, on the website. I want it to display 4 rows of photos, instead of 1 row.
<div class="profile_box_body">
<?php
if(!empty($RecentPhotos)){
?>
<div class="profile_photos_list row">
<?php
foreach($RecentPhotos as $value){ ?>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 media_item block-center">
<div class="profile_photo ">
<!--<a href="javascript:void();" class="clickable" data-toggle="modal" data-target="#myModal">-->
<a href="<?=WATERMARK_FILE!=''?DisplayImageWithWatermark($value):DB_DOMAIN.'uploads/images/'. $value['bigimage']; ?>" data-fancybox="gallery<?php echo $value["aid"] ?>" >
<div class="img-container-large">
<div class="img-responsive-container img-responsive-container--border">
<img src="<?=$value['image']; ?>" class="pImageBorder img-responsive-container__img">
</div>
</div>
<div class="pImageUsername"><b><?=$value['title']; ?></b><br/><?=$value['description']; ?></div>
</a>
</div>
</div>
<?php
}
?>
</div>
<?php
}
else {
?>
<a class="" style="float: none; text-align: center" href='<?=getThePermalink('account/&dll=gallery')?>'><p> <?=$lang_register_page['a14'] ?></p></a>
<?php
}
?>
</div>
This is not a problem with your HTML or CSS. The problem is into your PHP query. You should check first that, is there a limit = 1 called into your query?

Logo Image float on a Image Slider Wordpress Theme CSS

DISCLAIMER : I did not code the theme. This was made by another developer who left the project and I am making adjustments based on the new requirements. I don't have experience in Wordpress Theming but I can understand codes.
I am making a design in a website and I want to make my logo to be like floating above the Slider layer. I am working on a wordpress theme:
As you can see the Logo 'Red Dela Cruz' is on the top occupying a separate space or div. I want it inside the slider and floating on it like a layer, whenever the slide changes image, logo should still be there. Here is my code:
<div class="slider">
<img src="<?php echo $template_path; ?>images/redlogo_website.png" alt="" class="web-logo"/>
<div id="one-by-one-slider" class="one-by-one-slider">
<ul class="one-by-one-slider-large">
<?php
$args = array(
'post_type' => 'rdc_home',
);
query_posts( $args );
// The Loop
if ( have_posts() ) :
while (have_posts()) :
//the post for declaration
the_post();
?>
<li>
<img src="<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'thumbnail') ); ?>" alt="<?php the_title(); ?>"/>
<div class="slider-content text-center">
<div class="slider-heading shp-12 slides" data-animation="bounceInDown" data-duration=4 data-delay=1>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1><?php the_title(); ?></h1>
</div>
</div>
</div>
</div>
<div class="slider-heading shp-13 slides" data-animation="bounceInDown" data-duration=6 data-delay=2>
<div class=" container">
<div class="row">
<div class="col-md-12">
<h3><?php the_content(); ?></h3>
</div>
</div>
</div>
</div>
<!-- <div class="slider-heading shp-14 slides" data-animation="bounceInUp" data-duration=8 data-delay=4>
<div class=" container">
<div class="row">
<div class="col-md-12">
For Bookings
</div>
</div>
</div>
</div> -->
</div>
</li>
<?php
endwhile;
endif;
wp_reset_query();
?>
</ul>
<div class="one-by-one-slider-nav">
<ul class="one-by-one-slider-thumbs">
<li class="one-by-one-slider-element"></li>
<?php
$args = array(
'post_type' => 'rdc_home',
);
query_posts( $args );
// The Loop
if ( have_posts() ) :
while (have_posts()) :
//the post for declaration
the_post();
?>
<li></li>
<?php
endwhile;
endif;
wp_reset_query();
?>
</ul>
</div><!-- one-by-one-slider-nav -->
</div><!-- one-by-one-slider -->
</div><!-- slider -->
The logo is on the 2nd line and I haven't done any css on class
web-logo
This should work:
.web-logo {
position:absolute;
}
If the logo goes "behind" the slider, you should add a z-index, and make it higher, untill the image is showing:
.web-logo {
position:absolute;
z-index:2;
}
you can try this one:
.web-logo {
position: absolute;
right: 10px;
top: 10px;
z-index:2;
}

What is causing wrapper to break?

I'm not sure if I should post this in wordpress stack but if you go to the single.php
on my custom wordpress theme, you'll see that if you make your browser roughly less than 1200 pixels wide, you are able to horizontally scroll to the right. There should be no extra space to allow the horizontal scroll as the page content is in a wrapper div.
I have viewed the source and it appears that the content generated by wordpress through the_content() is creating divs that break the wrapper?
Here is the code for single.php Once again when I remove <?php the_content(); ?> the structural problem is not there.
<?php get_header(); ?>
<div class="page-section clear">
<!-- post thumbnail -->
<div class="single-image-anchor">
<?php if (has_post_thumbnail( $post->ID ) ): ?>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<a class="single-image" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" style="background-image: url('<?php echo $image[0]; ?>')">
</a>
<?php endif; ?>
</div>
<!-- /post thumbnail -->
<div class="container clear">
<main role="main">
<!-- section -->
<section>
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<div class="wrapper">
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post title -->
<h1 class="single-title">
<?php the_title(); ?>
</h1>
<!-- /post title -->
<!-- post details -->
<span class="single-date"><?php the_time(get_option('date_format')); ?></span>
<div class="single-text">
<?php the_content(); ?>
<br />
<a href="<?php echo get_permalink(18); ?>" class="back-article">
<i class="fa fa-arrow-circle-left"></i> News
</a/>
</div>
</article>
<!-- /article -->
</div>
<?php endwhile; ?>
<?php else: ?>
<?php endif; ?>
</section>
<!-- /section -->
</main>
</div>
</div>
<?php get_footer(); ?>
it's the facebook share buttons. The span wrapping it and the iframe are currently set to a width of 900px:
<span style="vertical-align: bottom; width: 900px; height: 25px;">
<iframe name="f2a1624528" width="900px" height="1000px" frameborder="0" allowtransparency="true" scrolling="no" title="fb:like Facebook Social Plugin" src="http://www.facebook.com/plugins/like.php?app_id=1526849080927795&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter%2F7r8gQb8MIqE.js%3Fversion%3D41%23cb%3Dfa87d2a78%26domain%3Dmichaeljeromeinprogress.themichaelsanger.com%26origin%3Dhttp%253A%252F%252Fmichaeljeromeinprogress.themichaelsanger.com%252Ff291a9dcc8%26relation%3Dparent.parent&href=http%3A%2F%2Fmichaeljeromeinprogress.themichaelsanger.com%2Fnye-bte-shows-on-sale-now%2F&locale=en_US&ref=below-post&sdk=joey&share=true&width=900" style="border: none; visibility: visible; width: 900px; height: 25px;" class=""></iframe>
</span>
set them to like 100px since those buttons are small anyways.
Whenever you get problems like this, do this:
div { border: 1px solid red }
Then look at all the div blocks inside the page. Take note on the one's that are touching the right edge.
If you go into Chrome, you can delete the element node. When I deleted the fb social plugin nodes, the horizontal scroll bar went away. So look into that...

Top Menu bar not working in My Wordpress site

I have two meny=u bar in my site. 1st- top menu 2nd- primary menu.Top Menubar not working in my site.I input it from menu but not working. I use hostme theme. My site http://www.dewdropzone.asia . My topmenu bar header code. See this theme demo for understand what top menu bar not show my site . click here
<?php if(get_option("topblackmenu") == "true") { ?>
<div class="topmenu">
<div class="inner">
<!-- .top_menu -->
<?php if (has_nav_menu( 'top-menu' ) ) { wp_menu_functon(); }?>
</div>
</div>
<!-- .top_menu -->
<?php } ?>
<div class="clear"></div>
<div id="header">
<div class="inner">
<!-- logo -->
<div class="logo">
<?php if($s_logo){ ?>
<a href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>">
<img src="<?php echo $s_logo; ?>" alt="<?php bloginfo('name'); ?>" />
</a>
<?php } else { ?>
<a href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>">
<img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" />
</a>
<?php } ?>
</div>
<!-- logo -->
<div class="sec-menu">
<?php if (has_nav_menu( 'primary-menu' ) ) { wp_primary_menu_functon(); }
else{
echo('<ul class="nav"><li>'.__('Go to WP-admin Appearance Menus and assign menu location', 'hostme_front').'</li></ul>');
} ?>
</div>
<!-- topmenu -->
</div>
</div><!-- topbar -->
<div class="clear"></div>
I'm sorry for adding an answer, but I don't see an option to comment in the question. Am I missing something?
Did you create your navigation through the Appearance>Menus in your Dashboard?
Make sure that you select the menu you have created as your 'Header Menu'.