New answers tagged

0

There are many differences in css files of both websites. For example, have a look at the div having class et-top-navigation by inspecting it in browser. You will find that in staging website, there is top padding and left padding applied while it is not in case of live website. Similarly check for other css changes in staging website or simply take backup ...


0

Yes, quick and dirty just create a new page template, set it as the home page. Then in your page template copy the signup code from wp-signup.php into the page template


0

You got javascript file and CSS file! Then you have to put those files in you child theme folder like themes -> your_child_theme_folder -> js(if you dont have js folder then create one) and place your js file here AND you have to put you css file in css folder inside your child theme. Now you need to call js file from functions.php If you dont ...


0

You need to "include" the WordPress functions which then will convert your shortcode from [mycode] to the code you expect. You do this by including wp-blog-header and setting wp_use_themes to false, this then stops the header.php of the theme from being added. define('WP_USE_THEMES', false); require ('./wp-blog-header.php'); You will need to change the ...


0

This kind of questions is better asked on StackOverflow community. Maybe this JS hack would help: var elem = document.querySelector('.search-form input[name="search_keywords"]'); if ( null !== elem ) { elem.onchange = function() { var e = this , v = e.value; if ( ! v ) return; v = v.toString(); if ( 0 === v....


1

This has to work, Im using it in several projects: add_filter( 'excerpt_more', 'my_excerpt_more' ); function my_excerpt_more( $more ) { return ''; } Just copy-paste it to your functions.php. Little bonus snippet that you might need: add_filter( 'excerpt_length', 'my_excerpt_length' ); function my_excerpt_length( $length ) { return 50; } ...


0

My philosophy is that if you use a system like WP then you embrace it and do things the WP way. WP has plenty of hooks that let you override functionality and the flexible theme structure gives you almost total control over the output. So, I'd advise using a WP theme and WP built in menus. Your menu items will link to normal WP pages. The site will work ...


0

If you're willing to create a child theme and put your PHP files in there, this approach is relatively clean. For each file, create a rewrite rule where you specify the path you want to use and the filename that should load. In the example below, /custom-path/ loads custom-file.php from the root of your child theme directory and /custom-path-2/ loads custom-...


0

You could create a page with the slug you want, and add a custom field that specifies the HTML path to output (in this example using either htmlfilepath or htmlurl as the metakey): add_action('wp','maybe_direct_html_output'); function maybe_direct_html_output() { if (is_singular()) { global $post; $htmlfilepath = get_post_meta($post->...


0

So far and as per what you provided in the discussion, this should help: add_action('wp', function() { $referrer = parse_url(isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '', PHP_URL_HOST); if( false === mb_strpos( $referrer, "facebook.com" ) ) { return; } /* Traffic from Facebook. Do actions here */ // ...


0

As for recent version of WordPress 4+ the solution provided here is deprecated, please check my answer here for more details http://stackoverflow.com/a/37571439/1358670



Top 50 recent answers are included