• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Porter

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 20 posts - 481 through 500 (of 516 total)
← 1 2 3 … 24 25 26 →
  • Author
    Posts
  • August 3, 2014 at 4:57 pm in reply to: Post types with ACF and Genesis #116875
    Porter
    Participant

    I'm not really experienced enough to help with this exact issue, but I'm going to go ahead and post my most recent code using ACF. I very recently (last week) set this up, so perhaps something in my code will help you.

    <?php
     
    /**
    * Template Name: Directory Listing
    * Description: Used for "directory" pages.
    */
     
    function location_category_loop() {
    
    	//Set the name of the page (Bars, Restaurants, etc), to a variable, so we can use it later to find all pages with the "location_category" custom field set to the same name.
    	$this_page_title = get_the_title();
    	
    		$args = array(
    			'sort_order' => 'ASC',
    			'sort_column' => 'post_title',
    			'meta_query' => array(
    				array(
    					'key' => 'location_category',
    					'value' => $this_page_title,
    					'compare' => 'LIKE' //Checks the custom fields array of "location_category" to see if the page name (variable we saved earlier) is a match to any of the values in the array.
    				)
    			),
    			'post_type' => 'page',
    			'post_status' => 'publish'
    		);
     
    	$pages = get_posts($args); 
    		
    		?>
    		<div class="entry">
    		<?php
    		
    		if($pages) {
    		
    			foreach ($pages as $page) { ?>
    				<div class="full-width-post" id="post-<?php $page->ID; ?>">
    					<?php echo(get_the_post_thumbnail($page->ID, array(320,180),  array("class" => "post_thumbnail"))); ?>
    					
    					<div class="directory-title">
    					<h2><a href="<?php echo(get_permalink($page->ID)); ?>" rel="bookmark" title="<?php echo(get_the_title($page->ID)); ?>"><?php echo(get_the_title($page->ID)); ?></a></h2>
    					</div>
    					
    					<div class="city-icon">
    					<?php
    					//Grab the value for the custom fields "city" field, and compare it against known values to determine which city icon to show (Burlington, South Burlington, Winooski, Essex, etc).
    					$testing = get_field('city', $page->ID);
    					switch ($testing) {
    						case 'burlington':
    							?><img src="http://anightinburlington.com/wordpress/wp-content/themes/genesis-anib/images/city-icon-burlington.png" /><?php
    						break;
    					  case "south-burlington":
    							echo("the location is south burlington");
    						break;
    					  case "winooski":
    							?><img src="http://anightinburlington.com/wordpress/wp-content/themes/genesis-anib/images/city-icon-winooski.png" /><?php
    						break;
    					  default:
    							echo("the location is default");
    					}
    					?>
    					</div>
    						
    						
    						<div class="directory-entry">
    						<?php echo(get_post_meta($page->ID, '_yoast_wpseo_metadesc', true)); ?>
    						</div>
    				</div>
    				<?php
    			
    			}
    		}
    		
    		?>
    		</div>
    		<?php
     
    	wp_reset_postdata();
     
    }
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'location_category_loop' );
     
    genesis(); ?>

    Basically what this is, is a custom template, with a custom loop. I'm looping through my pages (not posts), and grabbing all pages that contain the same page name (Bars, Restaurants, etc) as the ACF field of "location_category". I also check for which "city" is used, and use a case switch statement to display an icon for that city.

    Kind of shooting in the dark as to if this will help you or not, but I had a few issues myself, and this is what I ended up with. Hope it helps, if not, happy hunting 🙂


    Buy me a beer? | Try DigitalOcean VPS Hosting

    August 3, 2014 at 12:29 pm in reply to: CSS changes in Minimum theme not responding #116862
    Porter
    Participant

    Live edits seem to work just fine, when I inspect elements and change values. My only guess is you have caching issues.

    Are you using CloudFlare or any other CDN?
    Have you tried another browser / incognito window / clearing your cache?


    Buy me a beer? | Try DigitalOcean VPS Hosting

    August 3, 2014 at 7:46 am in reply to: Ambiance Pro Featured image text must be higher on frontpage #116850
    Porter
    Participant

    Post a link to your site so we can inspect the css.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    August 3, 2014 at 7:33 am in reply to: A Bit of CSS Help #116848
    Porter
    Participant

    Everything worked perfectly except for the float: right on .city-icon. I tried left, didn't work, got rid of float all together, works perfectly - many thanks!


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 31, 2014 at 9:47 am in reply to: hide primary menu from all pages but home #116445
    Porter
    Participant

    No, the check is "if it's on the front page, or on the home page" ADD the navigation. otherwise, it's remove it.

    Actually, I only glanced this thread, but that logic will add it if it is the home page, not sure where it's being removed everywhere else though.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 30, 2014 at 6:48 pm in reply to: Remove title from posts #116390
    Porter
    Participant

    That plugin will definitely do the trick, but I strongly advise against using a plugin whenever you can find an alternative solution - too many plugins will bog down your site.

    A simple, elegant solution, is to add the following to your child theme's functions.php file:

    //* Remove title from posts and pages.
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );

    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 30, 2014 at 11:34 am in reply to: sample theme question #116359
    Porter
    Participant

    Are you aware of the right click > inspect element ability of your browser? This allows you to see the code, and when you do this on a specific part of the site, you can find how it works.

    In your case, you want to search your style.css file for "e5554e", that's the red color being used. Do a "find" (ctrl + f) in style.css, and see what each area using "e5554e" is. I assume most will be a { (links), h tags, etc. You can even right click > inspect element on the page you like, to see the hex value of the blue that you like. You could grab that exact value, and replace the current red.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 30, 2014 at 9:46 am in reply to: sample theme question #116348
    Porter
    Participant

    Please provide a link to your site so we can see it.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 30, 2014 at 8:47 am in reply to: where to begin? #116342
    Porter
    Participant

    My biggest suggestion for learning, is to back up what you have now, rename it "something backup", and then go to town on editing and learning how everything works.

    Some helpful tips:

    -Right Click > Inspect Element - use this to inspect the code on a specific element of your page. If you want to see the current background color, right click, inspect element on the background off to the side, then search through the code on the popup in your browser to find "background: 303030", or whatever value it has. Once you know the background color, you can then open your style.css file, and make edits.

    -Find - This may seem super obvious, but using ctrl + f in any editor is a VERY powerful tool. For instance, above, you know the background color - open style.css, click at the top of the file (find will start where your cursor is, and work down the page), and search for the color value. Keep going until you find "background: 303030" (or whatever the color was), and edit it to your new value. Upload style.css via ftp (or edit it in WordPress, though I don't recommend this), and check your edits!

    -Incognito Windows In Chrome - ctrl + shift + n will open a window that doesn't save history, cache, etc. This is great for seeing small edits, as they are sometimes cached, and you'll have proper code that you THINK isn't working, because you can't see the edit.

    -Live Edit! - Using the right click > inspect element method, you can live edit the properties on the page to see how they look. Simply click on the value, and change it to whatever you want. This is perfect for ensuring that piece of code effects what you think it does. This is also a great tool for viewing other websites, and seeing how they do things, and changing values to see how things look.

    -W3Schools - Google search "something css", and W3Schools will come up with a very easy to understand explanation of how it works. For instance, "padding css" will bring them up at the top, and you'll learn how padding works. Anything property you see in the code (padding, background-color, font, margin, etc), can be searched with "css" in Google, and you'll learn all about it.

    -Don't Be Afraid - Code is intimidating at first, really intimidating. Rest assured that you have a backup (make sure you make a backup), and just go to town on trying things. You can't hurt anything, and you can only learn. If things get too messed up, revert to your backup, and start again.

    Best of luck!


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 30, 2014 at 8:30 am in reply to: Looking for Slider that handles video as well as images #116338
    Porter
    Participant

    You could also accomplish this with Shortcodes Ultimates - not 100% if you'd need some of the functionality from the paid add-ons or not.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 30, 2014 at 6:59 am in reply to: Custom Backstretch Image only for Home Page #116322
    Porter
    Participant

    You should have been able to just have css for body, and body.home. body.home would contain the css for the image, where as body on its own would contain just the background color. I haven't tested that, so I can't say it would work for sure, but that was what I was getting at in my post.

    It seems you've solved your issue either way though, so good job 🙂


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 29, 2014 at 2:30 pm in reply to: Genesis Sample Layering Issue #116256
    Porter
    Participant

    Oh, I definitely know how to fix it, I was just wondering if it's in anyone's best interest to have StudioPress raise the index, or have the developer of the plugin lower theirs. It may prevent less informed users of either product from running into trouble in the future.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 28, 2014 at 11:33 am in reply to: Custom Backstretch Image only for Home Page #116114
    Porter
    Participant

    You should be able to simply edit your style.css file. Add the following:

    body.home {
         //Your specific home page background here.
    }

    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 28, 2014 at 8:38 am in reply to: Remove word "home," "about," etc from pages Lifestyle Pro #116066
    Porter
    Participant

    I'm not 100% sure this is what you need, but try this. I used this to remove the page name at the top of the entry. Toss this in your functions.php of your theme.

    //* Remove title from pages.
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );

    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 27, 2014 at 3:08 pm in reply to: Translating Page To Genesis #116024
    Porter
    Participant

    With some more reading, I've nearly managed to acquire what I was going for. The only real issue now, is that the content has no background. The background used for sidebar, and content / entry area doesn't appear. I'm not sure how to change my code to include this.

    Any idea why the main background isn't showing up behind my content on this custom template?

    Updated Genesis Code

    <?php
     
    /**
    * Template Name: Directory Listing
    * Description: Used for "directory" pages.
    */
     
     //Remove original  loop
     remove_action( 'genesis_loop', 'genesis_do_loop' );
     
    // Add our custom loop
    add_action( 'genesis_loop', 'directory_listing_loop' );
     
    function directory_listing_loop() {
     
    	$this_page_title = get_the_title();
    		
    		$args = array(
    			'sort_order' => 'ASC',
    			'sort_column' => 'post_title',
    			'meta_key' => 'directory_category',
    			'meta_value' => $this_page_title,
    			'post_type' => 'page',
    			'post_status' => 'publish'
    		);
     
    	$pages = get_posts($args); 
    		
    		if($pages) {
    		
    			foreach ($pages as $page) { ?>
    				
    				<div class="full-width-post" id="post-<?php $page->ID; ?>">
    					<?php echo(get_the_post_thumbnail($page->ID, array(260,200),  array("class" => "alignleft post_thumbnail"))); ?>
    					<h2 class="title" id="post-<?php $page->ID; ?>"><a href="<?php echo(get_permalink($page->ID)); ?>" rel="bookmark" title="<?php echo(get_the_title($page->ID)); ?>"><?php echo(get_the_title($page->ID)); ?></a></h2>
    					
    					<div class="directory-entry">
    					<?php echo(get_post_meta($page->ID, '_yoast_wpseo_metadesc', true)); ?>
    					</div>
    				</div>
    			<?php
    			}
    		}
     
    	wp_reset_postdata();
     
    }
     
    genesis(); ?>

    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 23, 2014 at 8:44 am in reply to: Chrome Zoomed Display? #115514
    Porter
    Participant

    Resolved - there was an overall 150% increase on windows 8 setting hidden pretty deep, I must have changed it when I first got this laptop after being used to a 28'' monitor.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 23, 2014 at 8:26 am in reply to: Chrome Zoomed Display? #115510
    Porter
    Participant

    Update: It appears to be an issue with all browser content in general. I did the math on some pages, it's an exact 25% size increase. I uninstalled browsers, reinstalled, same issue. It must be a windows 8 setting, but I never changed it / can't find it anywhere.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 14, 2014 at 10:00 am in reply to: Fix Site – Mobile Responsive #114235
    Porter
    Participant

    Many thanks for clearing things up I'll give it a go today and post my results later on.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 7, 2014 at 9:48 pm in reply to: Entry Size Showing Larger Than It Is #113315
    Porter
    Participant

    Thanks for the help, knowing it was 4rem lead me to my answer. I wasn't finding it because I wouldn't see any changes unless I changed both my entry margin bottom, as well as the sidebar margin bottom at the same time (I didn't know they both had it).


    Buy me a beer? | Try DigitalOcean VPS Hosting

    July 7, 2014 at 4:36 pm in reply to: Entry Size Showing Larger Than It Is #113282
    Porter
    Participant

    The home page, the .entry and the primary right sidebar - both have a set height of 504, but show as 544 when inspecting those elements. That spacing between the bottom of the entry, and the white line before the footer, isn't supposed to be there, but is, and is the extra 40 pixels from the entry and sidebar bottoms that are just there for an unknown reason.


    Buy me a beer? | Try DigitalOcean VPS Hosting

  • Author
    Posts
Viewing 20 posts - 481 through 500 (of 516 total)
← 1 2 3 … 24 25 26 →
« Previous Page

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble