alexWP333
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Storefront] Modifying search.php in Storefront Child ThemeI found the location of the archive-product.php file, under the templates folder.
The only thing I need to know now is whether the code above is correct, or if your suggestion to “hook it in to one of the present actions” involves a different code snippet.
Any code details you can provide would be appreciated.
Forum: Themes and Templates
In reply to: [Storefront] Modifying search.php in Storefront Child ThemeThanks James,
I have two questions:
First, where can I find the archive-product.php file? I looked in the Storefront parent folder, and just found an archive.php file. I also looked in various folders in plugins > woocommerce, but still don’t see the archive-product.php file.
Second, when I do get to the archive-product.php file, would the code that I need to add be in this format?
function add_visual_element () { if (is_search()){ ... code to add visual element here ... } } add_action('posts_selection', 'add_visual_element');
Forum: Hacks
In reply to: Custom Meta Box for Edit Page ScreenIt turns out that I forgot to activate the plugin for the new meta box. My weekend brain was on vacation.
Thanks again for your help.
Forum: Hacks
In reply to: Assign a Class to the Input Text Field of a Custom MetaboxOK, I saw that I wasn’t being consistent with the parameters that I had entered. So, I took what you sent me, and put in the same parameters that I had started with, and together it worked.
Many thanks! Couldn’t have done it without your help.
<?php // Retrieves the stored value from the database $meta_value = get_post_meta( get_the_ID(), 'meta-text', true ); // Checks and displays the retrieved value if( !empty( $meta_value ) ) { echo('<p style="color:red;">'.get_post_meta( get_the_ID(), 'meta-text', true ).'</p>'); } ?>
Forum: Hacks
In reply to: Assign a Class to the Input Text Field of a Custom MetaboxThe next thing that I’ve tried was to change the code in my single.php file from this:
<?php // Retrieves the stored value from the database $meta_value = get_post_meta( get_the_ID(), 'meta-text', true ); // Checks and displays the retrieved value if( !empty( $meta_value ) ) { echo $meta_value; } ?>
to this:
<?php // Retrieves the stored value from the database $meta_value = get_post_meta( get_the_ID(), 'meta-text', true ); // Checks and displays the retrieved value if( !empty( $meta_value ) ) { echo('<p style="color:red;">'.get_post_meta( get_the_ID(), 'user_text_field').'</p>'); } ?>
Now my output text goes to red, which is what I was trying to get to work, but the output itself gives the word “Array” instead of the words that I typed into the input field of the custom metabox.
Forum: Hacks
In reply to: Assign a Class to the Input Text Field of a Custom MetaboxThanks. This is my first time setting up a custom metabox, so please bear with me. As a test I tried adding a CSS to change the font color for the output to red.
In particular, I tried changing this:
function prfx_meta_callback( $post ) { wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' ); $prfx_stored_meta = get_post_meta( $post->ID ); ?> <label for="meta-text" class="prfx-row-title"><?php _e( 'Example Text Input', 'prfx-textdomain' )?></label> <input type="text" name="meta-text" id="meta-text" value="<?php if ( isset ( $prfx_stored_meta['meta-text'] ) ) echo $prfx_stored_meta['meta-text'][0]; ?>" /> <?php }
to this:
function prfx_meta_callback( $post ) { wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' ); $prfx_stored_meta = get_post_meta( $post->ID ); ?> <label for="meta-text" class="prfx-row-title"><?php _e( 'Example Text Input', 'prfx-textdomain' )?></label> <input type="text" name="meta-text" id="meta-text" value="<?php if ( isset ( $prfx_stored_meta['meta-text'] ) ) echo ('<p style="color:red;">'.$prfx_stored_meta['meta-text'][0].'</p>'); ?>" /> <?php }
I’m either putting the code that you sent me in the wrong file altogether, or my syntax is incorrect, because the browser’s not yet displaying the output text in red.
Forum: Plugins
In reply to: feeds not showingCan anyone help me with this?
Thanks Allen,
I’m going to open up a new topic about this last question.Does this mean that the plugin isn’t designed to output multiple feeds from a single blog … a blog which has posts that are assigned to different categories?
Also, would this cause the web page in question to not display any of the feeds on the first browser viewing of the day, but to display them only after refreshing the browser?
Forum: Themes and Templates
In reply to: style.css not loading correctlyI called my host and they told me that I need turn off a caching button while working on the site. They said that, otherwise, I would make a style change, and it might not show up on the site for a few hours!
I didn’t realize that this was even necessary. I guess it’s one extra step in the process, but at least I now know what the problem was.
I wouldn’t have been able to figure this out without you.
Many thanks Stephen!
Forum: Themes and Templates
In reply to: style.css not loading correctlyNo error messages in the Appearance Editor. It just said “file edited successfully”.
Forum: Themes and Templates
In reply to: style.css not loading correctlyWhen I go to the style.css file in the Appearance Editor of my WordPress Admin I see this:
#bookPoetryUL { margin-left: 0px; height: 880px; } #bookTextbookUL { margin-left: 0px; height: 445px; }
And when I inspect the site my browser (using Firebug) I see this:
#bookPoetryUL { height: 880px; } #bookTextbookUL { height: 440px; margin-left: 0; }
Forum: Themes and Templates
In reply to: style.css not loading correctlyThat’s what I don’t understand. There are 2 CSS properties in the style.css file, so it should be showing both of those properties on the site. This is the first time I’ve run into something like this.
I’m completely stumped.
Forum: Themes and Templates
In reply to: style.css not loading correctlyyes, you can see the site at anniefinch.com/AnnieFinchTestSite
the page that’s giving me trouble is at anniefinch.com/AnnieFinchTestSite/books-2
the actual HTML in question is:
<ul id="bookPoetryUL"> content goes here </ul>
the actual CSS in the style.css file is:
#bookPoetryUL { margin-left: 0px; height: 880px; }
When I check the CSS in my browser’s Firebug I see:
#bookPoetryUL { height: 880px; }
So the margin-left property is missing altogether.
On the same page I have a second
- that has the same basic code:
<ul id="bookTextbookUL"> content goes here </ul>
and the CSS in the style.css file for this second
- is:
#bookTextbookUL { margin-left: 0px; height: 445px; }
When I view the CSS for this second
- in Firebug, both the margin-left:0px, and the height:445px; are showing up fine.
Yes, in the Edit Post page I am using category filters. I’ve set it up this way because I want to assign certain posts to display on one of the feeds that are on the Home page, and other posts too display on another of the feeds that are on the Home page.
Is this what you’re referring to with regard to your question as to whether I’m using category filters?