pdg87
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Changing mobile menu styleIf its for the site you linked to. It basically hides the main menu and shows the mobile menu when at mobile screen size. If it is that site. Adding css:
//hide menu button #mobile-nav-button { display: none; } //show mobile nav items .mobile-nav-container { display: block; }
Might give you a starting point/idea. Then just style the list how you want.
Or you could re-write the markup to suit.
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.No probs man, hopefully it doesnt cause any layout issues on other parts of the site. Its a little hacky, I’ll write up some cleaner code if I get a second.
I basically just renamed a few elements to remove the default styles/layout (CSS) that was being applied to them to work with the feature image ??
Forum: Fixing WordPress
In reply to: Match values from two arrays to return posts. wp_query?I just realised the values I have above for store_brands are wrong e.g. (Asda, Morrisons, Sainsburys). These should realte to the brands e.g (Ford, Mercedes) Can I not edit this post?
Thanks Keesie,
I printed the array for this part and it seemed okay. I think its the fact that the key includes comma seperated values.
So if I try to compare the array values from store_brands [Ford] [Mercedes]
with the key brand_names_alt value: [Ford, Fored]
It is returning none, as it is comparing ‘IN’ and looking for an exact match of the full string, rather than seperate values..
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.I just meant the URL, but I found it from the image you posted. Do you know css at all? There is a fixed height on the content wrapper to move it down. The title is also set to white in colour. This should work:
Change:<?php /** * @package Tesseract */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( has_post_thumbnail() && 'post' == get_post_type() ) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'tesseract-large' ); ?> <div class="entry-background" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>)"> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> </div><!-- .entry-background --> <?php } else { ?> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> <?php } ?> <div class="entry-content"> <div class="entry-meta"> <?php tesseract_posted_on(); ?> </div><!-- .entry-meta --> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'tesseract' ), 'after' => '</div>', ) ); ?> </div><!-- .entry-content --> </article><!-- #post-## -->
to:
<?php /** * @package Tesseract */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( has_post_thumbnail() && 'post' == get_post_type() ) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'tesseract-large' ); ?> <header class="entry-header"> <?php the_title( '<h1 class="entry-title-single">', '</h1>' ); ?> </header><!-- .entry-header --> <?php } else { ?> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> <?php } ?> <div class="entry-content-single"> <div class="entry-meta"> <?php tesseract_posted_on(); ?> </div><!-- .entry-meta --> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'tesseract' ), 'after' => '</div>', ) ); ?> </div><!-- .entry-content --> </article><!-- #post-## -->
The code needs cleaning up really there is if statement where I dont think its needed (my php is poor)
you should really add styles to the new title class .entry-title-single
a quick and dirty inline fix if you want it the same style as other pages just a different colour:
change
<?php the_title( '<h1 class="entry-title-single">', '</h1>' ); ?>
to
<?php the_title( '<h1 style="color: #000;" class="entry-title">', '</h1>' ); ?>
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.Yep if possible?
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.Okay, if you change:
<div class="entry-background" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>)"> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> </header><!-- .entry-header --> </div><!-- .entry-background -->
to:
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
Or if there is a direct link to the page live? I could probably help more
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.okay, Im not sure what your css is for each element. Instead try removing:
<div class="entry-background" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>)"> <header class="entry-header">.
and
</div><!-- .entry-background -->
Forum: Fixing WordPress
In reply to: How do I keep header background black, when scrolling down?add this:
.nav-collapse.collapse, .no-navbar .nav-collapse { background: #000; }
if you want to remove the rounded cornered add this:
.nav-collapse.collapse, .no-navbar .nav-collapse { background: #000; border-radius: 0; }
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.Could you not just remove the following part:
style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>)"
Forum: Fixing WordPress
In reply to: Unable to remove Featured Image in Post page.are you removing the closing </div> and </header> tags when you remove:
<div class="entry-background" style="background-image: url(<?php echo esc_url( $thumbnail[0] ); ?>)"> <header class="entry-header">
Forum: Fixing WordPress
In reply to: Query using string from custom field as array valueSorry Im talking to myself ?? But do I need to add this somehow to use the current post custom field value?
$value = get_field( “main_atrributes” );
If so how would I work it into the array?
Forum: Fixing WordPress
In reply to: Query using string from custom field as array valueWhen I call ‘main_atrributes’ as a value, will in get the string from every single custom field with this name, rather than for just the page you are on?
This could be where I’m going wrong.. if so how do I use the custom field only from current post you are viewing?
Forum: Fixing WordPress
In reply to: Site Structure and dynamic pagesGreat thanks, it’s Going to be easier for me to try and put this into practice and see how I get on. I’ll report back ??
Forum: Fixing WordPress
In reply to: Site Structure and dynamic pagesThanks Chad I will look into taxonomies, I had a brief read earlier and seemed to be similar to what I need.
I could create each offer grouped to a relevant store. But how would I be able to create a page to list these for each store under offers. e.g
/offers/Store1 (lists all offers for store1)
/offers/Store2 (lists all offers for store2)
Would I have to do it manually?