Can this code be concatenated?

this is more a PHP question you can try these folowing forms : if (…) { echo ‘<p>’; get_template_part(‘templates/xxx’); echo ‘</p>’; } or if (…) { ?> <p> <?php get_template_part(‘templates/xxx’); ?> </p> <?php }

Gravity Forms, multiple conditions in shortcode

You can nest the singular and plural versions of the shortcode: [gravityforms action=”conditional” merge_tag=”{:3}” condition=”greater_than” value=”10″] [gravityform action=”conditional” merge_tag=”{:3}” condition=”less_than” value=”30″]Your value is greater than 10 less than 30[/gravityforms] [/gravityforms] More details on that here: https://gravitywiz.com/gravity-forms-conditional-shortcode/ – OR – You can use this snippet to create multiple conditions in a single shortcode: https://gist.github.com/spivurno/9db18385ed1d1f11a897bdfa8a1f2007 [gravityforms action=”conditional” … Read more

Additional conditions tags to work

Count the brackets, you’ve got an extra one: // ↓ here if ( is_user_logged_in() & !is_admin() ) & !is_page(‘account’) ) { Also, you should use double ampersands in conditions like this. So: if ( is_user_logged_in() && !is_admin() && !is_page(‘account’) ) {

Filter for the Custom Post List Page

The restrict_manage_posts hook supplies the current post type as the very first parameter to the callback function (which is book_genre_filter_page() in your code), so you should use it (instead of the static $type variable in your code) to determine the current post type or to ensure your custom filter is displayed only on the admin … Read more

Conditional tags help (if none, don’t display anything)

For the pingbacks ul & h2 you’ll have to move it inside your mytheme_comments function, which should be in your themes functions.php file. The tags are a bit easier, you just need to them inside the php: <?php the_tags(‘<div class=”postTags”>’,’ ‘,'<br /></div>’); ?> So it won’t show an empty div when there aren’t any tags.

Is there any way to assign stylesheets to whole sets of pages using is_page( )

Assuming that you’re using parent page “photos” as a path. It’s good practice (and required by WordPress Theme Guidelines) to use body_class() function for output different classes, based on current page or post. Just insert this function in your theme. <body <?php body_class(); ?>> This function will add parent-pageid-(id) class on every child page, cause … Read more

Only on single post page

If you mean a single post, not a page then use the conditional tag is_single() and check for this, like: function demo_link() { if ( is_single() && in_category( ‘themes’ ) ) { // Some code #1 } else { // Some code #2 } } add_action( ‘thesis_hook_after_post_box’, ‘demo_link’ ); If you will use it on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)