New answers tagged

0

This may be due to a plugin. Try deactivating all plugins by using the plugin screen select all and use the bulk action to disable all. Afterwhich try installing the WP update again and it should work assuming that this was wotking before and it recently stopped.


0

You may want to check what the Codex recommends for file permissions vs. what you are using. http://codex.wordpress.org/Changing_File_Permissions


0

Things to check Who is the owner of wp-content and sub-folders of it ? Which group does owner of wp-content belongs to ? (Is user in group www-data) ? Are permissions set recursively to wp-content ? I think the problem for you lies in the ownership of wp-content. Even though you have set 777 permissions to wp-content and the owner might be a custom user ...


0

If you use wp_enqueue_style(), with your function, you could call the function from the page (single.php etc.) ... pass a string through with the page name, use that in the function to decide which style you are enqueuing. This will then load the script in the head in the correct manner. https://developer.wordpress.org/reference/functions/wp_enqueue_style/ ...


0

get_the_date and get_the_modified_date use the date_format option set on the Settings -> General screen. Changing your date format there should change the date formatting returned by these functions without having to change TwentySixteen. You can also use the filters of the same names to conditionally filter the dates depending on conditions. For example, ...


0

if customizer(live preview) doesnt work or doesnt load and nothing is shown, try these steps: do you have redirections on the problematic site (double check and ensure, there might be coded a custom redirection in your plugins/codes)? while the circle is still loading, change any option in customizer and click "SAVE & PUBLISH" and see, maybe a simple ...


0

function your_function() { global $current_user; if($current_user->roles[0] == 'administrator') { add_meta_box(your parameters); // fill in your parameters } } add_action('admin_init','your_function');


1

Well it turns out Apple News doesn't accept password-protected RSS feeds. Thanks for the help!


1

This will display the title of the page when a static page is set to show posts. e.g. I show posts on my homepage... It'll do nothing. If I, say, show posts on page titled News... It'll show News in H1 This is used so that title of the page is shown, whenever posts are shown on a page but nothing when blog posts are shown on front page (home page). We ...


1

I am not sure about "popular", it doesn't seem so to me (but then I don't look at that many themes). You seem to grasp fine what each conditional does, so this shouldn't be confusing to you. This combines conditions to check that blog index is being displayed and it's not at the front page. Ah, the reason for single_post_title() I would guess is that it ...


1

This is a shot in the dark because I can't see the site... Check the way your theme uses css to align your sidebar and see if the width that is being set to the div by the user is causing the post container to become too wide, pushing the sidebar down. You could use some css to control elements within the posts container such as: I would try to find the ...


1

I would consider this not really a typical WP question – maybe you should ask over at http://unix.stackexchange.com – but maybe this could already help anyways: If you have access to the server config and you know the IP address of FB Instant Articles and Apple News you could for example block everybody from accessing your feed – but allow FB Instant ...


0

You're looking for: underscore S (_S) theme, maintained by WordPress theme itself. Here is the link: http://underscores.me/ Another good one to start is: https://wordpress.org/themes/clean-simple-white/


3

Sidebars are stored in global variable $wp_registered_sidebars. You can get the sidebar properties using this variable. global $wp_registered_sidebars; if ( isset( $wp_registered_sidebars['sidebar-2'] ) ) { echo $wp_registered_sidebars['sidebar-2']['name']; } Note that do not use it too early, either on/after widgets_init hook or in a template ...


0

Swopnil Dangol is correct, However seeing that you are editing a standard wordpress theme in the first place with bootstrap i would not bother the below answer is the for lazy man. php echo get_template_directory_uri(); ?> infront of the urls


0

You can also try to set the "priority" option add_action('wp_head','AB_late_css',1); function AB_late_css(){ $source = get_stylesheet_directory_uri().'/adjust_ABplugins.css'; wp_enqueue_style('adjust_ABplugins', $source); } where 1 is set a priority before the default priority of 10.


0

It is not "some", about 10% of the population of earth use rtl langs ;) Anyway, rtl.css should always be loaded after style.css to be able to override the ltr styles when needed, hopefully without using !important.


0

If you want to link stylesheets and scripts in wordpress,the correct way is to use wp_enqueue_style() and wp_enqueue_scripts() in your functions.php file Try this in your functions.php file wp_enqueue_style('bootstrap-css',get_template_directory_uri().'/bootstrap/css/bootstrap.min.css'); ...


1

$all_the_images = get_attached_media( 'image', 31 ); should return any image attachments for a page the ID of 31 if that page has child images. Meaning, there are images that were uploaded and actually attached to that page, not just upload and inserted into that page. When you use the media uploader (to upload images), from within the Edit screen of the ...


0

i have the same problem. The above fixed most of the theme styling however the portfolios and blog shortcodes and category pages are blank. They load the content and then it dissapears once the page fully loaded. Other style sheets maybe not loaded correctly to maybe?


4

You can use sprintf: echo sprintf( __('Follow %s on Facebook', 'yanse'), get_bloginfo('name') );


0

So after a long search I found my mistake. In the functions.php wp_enqueue_scripts( 'awesome-landing-page' ); Should bewp_enqueue_script( 'awesome-landing-page' ); Without the 's'. Seems like a beginners mistake, so sorry for bothering. Still I find the misbehaviour of the Apache misleading. Bye for now!


0

For the archive by the term, you should go with taxonomy template. For you it will be taxonomy-project.php When you work with custom post type , you should update the permalink structure when you make changes on templates, I mean register new post type or create new template file


0

When developing a theme, you should turn on WP_DEBUG in wp-config.php. It will tell you what the error is. For your case, it seems a syntax problem which leads to server down, not an apache issue.


-1

Guess what ! it was the die() which was breaking everything. And the way I found it was totally lame(removing approx 2000 lines of code one by one). Anyways the reason makes a bit sense to me now. Thanks!


0

There is likely a javascript error in /js/custom.js Look for the line: $( 'a[href*=#]:not([href=#])' ).click( function() { Change it to: $( 'a[href*="#"]:not([href="#"])' ).click( function() { You'll probably still have quirks with the page builder and various other functions until a theme update is released. Or, revert to the previous default version of ...


0

I think this is likely due to the issue of the core upgrade to jQuery 1.12. Check out this page: this page. In the core discussion yesterday it was the highest priority, and decided that it relies on the theme developers, and the users to update. Please take a look at that link, it is extremely helpful. They also stated that because of this change and the ...


5

It turns out that the ThemeWoot Emulate theme registers and enqueues a common.css file with the key of common in it's themewoot.php (which is being included in functions.php). This key is apparently conflicting with a wp-admin script being registered with the same common key, and so, instead of including Emulate's common.css, it's enqueuing and injecting ...


1

Any extra code on your server is a theoretical security risk. Instead of checking each plugin and theme if they are security risk even if they are not active, it is much easier to just delete them. This of course should not prevent you from backuping them first in case you will decide that you need them in the future ;)


0

Figured this out - had to change the container to hold image widths of 24.9% or 50% depending on layout, remove the clear from both post divs and stretch the .site width to 100%. From there I had either 4 horizontal images or two x two set-up. If anyone has any questions about this feel free to ask.


3

You've touched on a few things here, and there's both the server and the frontend response time that you're battling with. You might have issues with both. It's worth noting firstly that PageSpeed (and the style recalcuating alert in the Chrome timeline) both deal with front-end aspects only - in slightly different ways though (another good tool to check ...


1

Your child theme functions.php loads before the parent theme's, so you're trying to remove the action before it's added by the parent theme. Hook after_setup_theme to remove/add, which is executed after both child and parent load. add_action( 'after_setup_theme', 'wpd_wp_head_function' ); function wpd_wp_head_function() { remove_action( 'wp_head', ...


0

Put this lines of code in function.php if (function_exists("register_sidebar")) { register_sidebar(); } Put this to sidebar.php <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <?php $image = new WP_query ('showposts=1'); if(have_posts()) : while($image->have_posts()) : $image->the_post; ?> <a ...


1

By the sounds of it, your custom theme is missing the common hooks that allow plugins to alter/output their code. To take a simple example, every theme should have a call to wp_head() somewhere in the section of the output page. This allows a plugin to "hook" into your , and for example, output code to load its Javascript. Here's a real-life example. The ...


0

In my understanding (and I'm not a lawyer, etc etc), this would not count as distribution. I make this distinction mainly based on the fact that a separate GPL-flavoured license actually exists where this would count as distribution - the GNU Affero General Public License. GitHub's choosealicense.com states: GNU AGPLv3 is distinguished from GNU GPLv3 ...


0

If you want to change the search behavior, then, all you need to do is add your own fields to the form <form role="search" method="get" id="searchform" action="http://www.test.dev/"> <div> <label for="s">Search for:</label> <input type="text" value="" name="s" id="s" /> <input type="hidden" value="1" name="sentence" /> ...


1

I agree with @Zlatev that you probably wouldn't want to do this clientside. There are easier ways to include less. There are plugins that allow you to do this. Even jetpack has less support. If your goal is to include this in your theme you can use wp-less. Just download that plugin and drop in somewhere in your theme and include it in your ...


-2

if you do not want to (or you cannot) change permissions on wp-content so your web server has write permissions, then add this to your wp-config.php file: define('FS_METHOD', 'direct');


0

NO, this is only because of the owner/permission of your folder where wordpress files are present. Please check the folder permission, if that is 0755 then replace it with 0777 by using chmod 777 -R FOLDERNAME and try to upload, After this if will get again same issue change the folder owner by using chown www-data FOLDERNAME For example in your case the ...



Top 50 recent answers are included