Tag Info

New answers tagged

0

Work with the options found under Gallery > Other Options > Lightbox Effects ... "What must the lightbox be applied to?" These will allow other images not in the NextGEN Galleries to be opened into the Lightbox Effect you have chosen.


1

Could be as simple as using the full function in the template file: <?php comments_template( '', true ); ?> Be sure you have a comments.php file in the theme folder. And be sure you're using the full loop: <?php require('/the/path/to/your/wp-blog-header.php'); ?> <?php $posts = ...


0

There's at least 3 options to choose from: You can use the single CPT file name which you can grab from the source code in the body classes or a custom class which can be added directly to the single-cpt.php file or using a functions file with conditional tag. .single-cpt { your declarations } Or add directly to single-cpt.php file add_filter( ...


0

If you want all of the visual aspects of the second theme on that one page, you could do something like this. It's hacky and I wouldn't recommend doing this but it's your question! From where you say you're at now (separate header/footer/page.php) you simply need to update the URLs that call in the CSS and other support files. These may include a "pieces, ...


1

As Pages are a special built in Posttype, they get an own template hierarchy. Other "normal" post types and custom post types can only be templated by "single-$posttype.php". You can however hook into the single_template filter and make wordpress redirect to your template file: function get_custom_post_type_template($single_template) { global $post; ...


0

I just got this working last night using the above code (and the extra comment) and there are a few things I'd like to add here. First, in the "To get the PDF" section, 'wpcf-brochure' should be changed to 'wp_custom_attachment'. Next, to answer the final question from OP, to make it appear in the back end, here's the technique I used. Before the line ...


0

I think the best way would be to store the complete date-time in one meta field, saving it as an timestamp in the metafield and converting it by php datetime object functions for displaying. Step 1) Create a Metabox with a text input for entering the date + time. You can find a good introduction to meta boxes here: ...


0

You can try modifying your query using pre_get_posts filter. function mod_query() { if ($query->is_main_query() && !is_admin() && is_search()) { // test print queried search terms print_r( $query->query_vars['s'] ); $search_terms = $query->query_vars['s']; $search_terms = preg_replace('/\s+/', '+', ...


0

@brasofilo is nearly there but there is a better way to do this. Goto your theme folder and create a folder called 'theme-my-login'. Copy any file from the theme-my-login/templates folder into this new folder. The plugin will first check the theme's folder and then the template folder. This is standard practice in WP for dealing with template files. EG. ...


0

Use add_action( 'save_post', 'shortend', 999); and put this in your function as first. if ( 'project' != $_POST['post_type'] ) return $post_id; If this doesn't work then you should echo $_POST; and see if kaart_verkoop is part of the array.


0

Easiest thing you can do is make it a anyname.php and wrap this tagline in it. <?php Template Name: Index ?> <html>elements within it</html> In WordPress go to any page you create and choose template name: Index. From WordPress go to Settings > Reading and choose the custom page you want. This will avoid bad seo practises and keep you ...


0

You could use wp_redirect <?php wp_redirect( 'http://www.example.com/your-page/', 301 ); exit; ?>


1

Put the code from the index.html page into a file called front-page.php and put that in your theme directory.


0

Would you mind if I just leave bread crumbs so you can solve this pazzle ? add filter 'query' hook $wpdb->prefix & local wpdb prefix value somewhere in *_options table remove_filter show values Once one wpdb instance declared... you can reach any table in it (beware I said table in one DB). But you can't do what you actually doing right now. YOU ...


1

No, there should be no issues running multiple multisite installs in a single VVV setup. I have at least 4 multisite installations running on my machine as I type this. Your issue is likely either because your multi-sites are identical, and share database tables and/or URLs, or, you've added a subdomain site and you now need to re-provision VVV to get the ...


0

I agree with Pat above - I'd say from my own experience it probably helps in the long run making a Custom Post Type for houses to keep hundreds of the things separate from your main pages (or blog). For starting with coding it all - sometimes to kick off with and starting to learn about these things it will give you a headstart to begin with plugins. I ...


0

The main query that runs on archive pages are quite specific to archive pages, and this query is not replicated with a default custom query. As your code stands, your query will retrieve posts according to published date, ie from newest to oldest, and not according to archive. THE PROBLEM There are a couple of issues here that I would like to point out. ...


2

Use below code for getting post format, simple made condition if post format ="standard" then load your preferred template $format = get_post_format(); if($format ="video") { get_template_part( 'format', $format ); } Something like this.


1

Just create an array with your classes and loop through alongside with the main loop: function custom_top_products() { $classes = array( 'first', 'second', 'third', 'fourth', 'fifth' ); $classes_count = count( $classes ); $posts = new WP_Query( array( 'post_type' => 'products', 'post_status' => 'publish', 'orderby' ...



Top 50 recent answers are included