lfeddern
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: display error message when return is empty(and hence not be empty) if there another function that would work? I tried to look and tried is_null but also didnt work
Forum: Fixing WordPress
In reply to: display error message when return is emptywhen i try !empty() I get the error message displayed for all profiles though. Even those without events. So I guess for some reason even when the shortcode returns no events it must return somehing
Forum: Fixing WordPress
In reply to: display error message when return is emptyThanks for the reply. Still displays when there is an event but the if statement doesn’t seem to be working as the error message is not showing when there are no events.
Is there something that I need to add in order to display text when the variable $events is returned as text?
Forum: Themes and Templates
In reply to: Different stylesheets for different templatesAm I right in thinking by editing the functions file in the parent theme you will lose after an update? Thanks for the above though led me to search similar stuff and come up with this solution that worked!
<? function lander_work_script() { if ( is_page_template('page-templates/page_prevdefault.php') ) { wp_enqueue_style( 'lander-work-style', get_stylesheet_directory_uri() . '/prevdefault.css'); } } add_action('wp_enqueue_scripts', 'lander_work_script',15,0);
Thanks for your help Jimmy, appreciate it.
Forum: Themes and Templates
In reply to: Different stylesheets for different templatesI really appreciate your help btw! I am very much a beginner trying to learn the ropes!
Forum: Themes and Templates
In reply to: Different stylesheets for different templatesthanks for your reply this is the function from the parent theme, how would I add the if statements to the child themes functions file? Am I right in thinking that the functions in functions.php in the child theme are loaded in addition to the parent theme functions, so how do I write the conditionals to override the main function in the parent file?
function et_divi_load_scripts_styles(){ ....(load of code).... /* * Loads the main stylesheet. */ wp_enqueue_style( 'divi-style', get_stylesheet_uri(), array(), $theme_version ); }
Any ideas on how to get them to show up? to clarify the events are showing in the front end.
Thanks