hrcwebmaster
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Problem using custom fields within WordPress functionsSorry, I don’t know about declaring $post as global, could you send me some documentation? I’m new to WordPress and PHP.
Thanks!!Ok I’ll try that, thanks.
So I have to replace each and every custom field with a link within WordPress after my site goes live? That’s nearly 1,000 links I’ll have to go back and replace!
Forum: Fixing WordPress
In reply to: Add more than one custom field at a timeThank you so much!! I downloaded it and tested it and it did fix the issue. Do you have any idea how much time this saves me? Thanks again!!
Forum: Fixing WordPress
In reply to: Add more than one custom field at a timeOh good, I’m not crazy, it was working fine in the previous version! Thank you! I’ll try to report this some way…
Forum: Fixing WordPress
In reply to: Custom field in hyperlink, inside recent postsI figured this out on my own – I put the RSS image before all of the PHP code and it displayed perfectly.
Forum: Fixing WordPress
In reply to: recent posts by tag(custom field)Thanks! That first set worked (I did have to still include everything from
$my_queryforward, in case anyone is using this forum later).
I don’t need a pagination because I have a full newsroom on another link, this is more of a “preview” of the recent posts.
Thank you so much!!Forum: Themes and Templates
In reply to: [Theme: Catchbox] Dynamic headers/featured image as headerOk I figured it out. In header.php I added this code:
<?php // Check to see if the header image has been removed if (get_post_meta( $post->ID, 'custom-field', true )) : ?> <h1 id="site-logo"> <a href=" <?php echo esc_url( home_url( '/' ) ); ?>" title=" <?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <img src="<?php echo get_post_meta( $post->ID, 'custom-field', true ); ?>" /> <?php else : ?> <img src="<?php header_image(); ?>" /> <?php endif; ?>You just need to replace
custom-fieldwith the name of your custom field.Forum: Plugins
In reply to: Custom fields and custom menusNever mind, I realized I can create as many custom menus as I want (hopefully as many as I want!), my theme limits me to 3 menus for footer/side/header.
I used this thread. to find code to put in my header file to pull the appropriate menu I want.
Anyway, great discussion 😉Forum: Plugins
In reply to: Custom fields and custom menusAnybody?
Forum: Plugins
In reply to: Custom fields and custom menusOK I figured out part of this. I put this code in my functions template:
#set ($name = get_post_meta($post->ID, 'member-name', true)Then in my menu I can put http://www.mysite.org/$name/bio.
For each of my parent and children pages, I put the custom field name as “member-name” and the values as the “joe-smith.”
So when I go to Joe Smith’s page, it will go to his Bio, Newsroom, etc. But when I switch to Sally Anderson’s page, and click on Bio or Newsroom, it takes me to Joe Smith’s Bio, Newsroom, etc.
So close, would appreciate any help!!
Forum: Themes and Templates
In reply to: [Catch Box] [Theme: Catch Box] SliderOk I did find the styling for the slider, most is in style.css but I did find some in functions.php. You should be able to amend the horizontal nav bar color there.
Forum: Themes and Templates
In reply to: [Catch Box] [Theme: Catch Box] SliderUnder Appearance, go to Featured Slider. There you enter in the IDs of the posts you want featured in the slider. I found that it did not put it on my home page, but put it on my page of posts instead. You can read my solution to that here: http://ww.wp.xz.cn/support/topic/catch-box-theme-slider-on-initial-static-page?replies=3.
As for the color of the nav bar, I’m not sure. You could look in the style.css file.Forum: Themes and Templates
In reply to: Catch Box Theme – slider on initial static pageHi there,
I’m a total newbie, but I did figure out how to do this (after many other failed attempts different ways).
I had to create a home page template (http://codex.ww.wp.xz.cn/Stepping_Into_Templates)<?php /** * Template Name: Home * The home template file. * * This is the template file used for displaying the home page. * @package WordPress * @subpackage Catch_Box */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php catchbox_content_nav( 'nav-below' ); ?> <?php else : ?> <article id="post-0" class="post no-results not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Nothing Found', 'catchbox' ); ?></h1> </header><!-- .entry-header --> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'catchbox' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> <?php endif; ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>Then I went to index.php and cut the code which tells the site to display the slider:
<?php if ( function_exists( 'catchbox_sliders' ) ) { catchbox_sliders(); } ?>Then I pasted the above code into my new home page template beneath:
<div id="content" role="main">Mine won’t display perfectly in all browsers (it’s just shifted to the right a bit), only in Firefox. I’m trying to figure out the alternate codes for the ones inserted automatically by the slider.
Hope this helps you guys though!