Forum Replies Created
-
AuthorPosts
-
Hi Nikko,
Sure thing. FTP deets are in the private box below :)
Rikard,
My apologies – it was a conflict with an outdated plugin. Please close this message.
Regards,
Ash
Sure. Now removed. Site running WordPress 4.6 and Enfold 3.7.1.
Cheers,
Ash
Thanks. Now updated and issue is still there :(
I’ll need to unlock your IP so you can view (it’s on a dev server at the moment. Can you send it to me and I’ll fire you across a log in. Thanks :)
Thanks. Can I duplicate this file in the child theme to avoid amending the main theme?
Hi,
Sure – I’m referring to this message: https://www.dropbox.com/s/9d1cpcj1x4w0hkt/Screen%20Shot%202016-07-19%20at%2009.38.32.png?dl=0
“Alright Sparky. All saved, etc. ”
Ash
July 13, 2016 at 10:26 am in reply to: Display the post category above the title in masonry view #660247Ismael,
Cancel my last request – found it. For reference for other folk:
add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_cat', 10, 2 ); function avf_masonry_loop_prepare_mod_cat( $key, $entries ) { $categories = get_the_category($key['ID']); $separator = ' '; $date = get_the_date('d.m.y'); $output = ' <div class="ww-masonry-cat">'; if ( ! empty( $categories ) ) { foreach( $categories as $category ) { $output .= '<span>' . esc_html( $category->name ) . '</span>' . $separator; $output .= '<span>' . esc_html( $date ) . '</span>' . $separator; } } $output .= '</div> '; $key['text_before'] .= trim( $output, $separator ); return $key; }
Cheers,
Ash
July 13, 2016 at 10:10 am in reply to: Display the post category above the title in masonry view #660244Ismael,
That’s awesome! Thanks!
Can I do the same thing with post date too?
Hi,
Please close this. Found the error. Thanks :D
Josue,
Many thanks. I actually worked this out just before your answer came through, but thanks for helping out anyway. That solution works well :)
Ace work! :D
July 8, 2016 at 3:41 pm in reply to: Display the post category above the title in masonry view #658482No that doesn’t work. I can’t test with any other theme as I need this to work with the Advanced Layout Editor.
Perhaps I’m not being clear. To reiterate:
1. I create a shortcode in functions.php. For simplicity I’ve called it ‘test’.
2. In the Advanced Layout Editor I insert the shortcode where I want it to appear in the page.
3. When the page renders, the shortcode output is placed before all other DOM elements, not in the correct place as directed by the Advanced Layout Editor.
4. The shortcode renders correctly when returning html, but incorrectly when returning php (ie, a loop).If the shortcode is hard-coded into the page template, it renders correctly.
Thanks.
I still get the same issue with the parent Enfold theme. I just need to know how to wrap a loop in the $output operators as you showed me in the original answer. This code (that you gave me) works for outputting html:
function test_shortcode() { $output = "<h2>My Shortcode</h2>"; return $output; } add_shortcode( 'shortcode', 'test_shortcode' );
But fails when I try to create a loop as shown in my opening post.
I’m working locally so can’t provide access at the moment. Also, I tried to re-open the original topic , but it wouldn’t allow me to.
Regards,
Ash
Simple! I knew I was being dumb. Thanks :)
However, how do I pass WP Query arguments through this method?
- This reply was modified 8 years, 4 months ago by ashloudon.
Hi,
Where is the file structure can I find the template file the drives the preloader? I’d like to replace the CSS loader with a gif (client has a specific idea that won’t work using CSS anim). Thanks :)
-
AuthorPosts