Tag Info

New answers tagged

1

You cannot access the $headers property as it is a private property. Members declared as private may only be accessed by the class that defines the member For that reason, you get NULL when you try to access the property with wp_get_theme()->headers. You need to make use of the magic __get() method of the class to get the info you are after. ...


0

They are not Wordpress themes, they are HTML.


1

This is called wp editor, which uses tinymce editor and odds. This editor can be called using wp_editor function. To display it on your options page, use wp_editor(); Like - $field_value = get_option('a_custom_textarea'); $field_name = 'a_custom_textarea'; wp_editor( $field_value, $field_name ); Ref - ...


0

Please learn how to template for WordPress first, before proceeding further. It will help you understand how you are proceeding and what you are achieving. Please note what is the Minimal requirement for a theme to BE a 'theme': index.php (not index.html) style.css That's it. It will work like a complete theme, and you can activate the theme without ...


1

OK, I'm just going to list things out as I go through. Some of what follows is stylistic feedback, some is security related, some is functional: <div class="home-featured-block"> <?php $featured_block=$profitmag_settings['featured_block_one']; $no_of_block=$profitmag_settings['no_of_block_one']; I don't ...


0

You should be able to just use the default get_next_post_link with $in_same_term set to true. Have you tried that? Instead of your <?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'sixteen' ) . '</span>' ); ?> try this <?php next_post_link ...


-1

You can call the parent css as a separate file in your theme header.php Something like <link href="<?php echo get_stylesheet_directory_uri(); ?>/css/css.css" rel="stylesheet"> Depending on various factors it may be better to copy and paste the parent css into your child css file, and thus no need to import it at all. Saves http requests ...


0

Found this question doing my own research, and ended up developing a richer solution that I thought might be valuable. If you want to know the url of the media size selected by the user, then the following code (full jQuery code below) will do that for you: jQuery(function($) { // Bind to my upload butto $(document).on('click', ...


0

I know this has already been answered, but in case anyone else runs into it: if there is a ?>\n in any of the included files of the theme's functions.php or in functions.php itself at the very bottom, that can cause it as well.


1

I would say no, its bad practice to disable it. The simple truth is disabling wpautop pretty much breaks the line spacing in the visual editor, and if your clients are going to want to use the visual editor, which most of them do. Also, Is there any way to fix formatting with disabling wpautop ? Here is a good related post that might help: ...


1

Unfortunately there is no simple formula to determine if a specific plugin and theme will work together. There is no testing body that mixes all possible combinations together to verify the work; there are too many themes and plugins for such a solution to be viable. This leaves the ownership of the task in the hands of those that are trying to install the ...


1

So in theory WordPress extensions are all using its APIs to peacefully and happily coexist. In practice the landscape of WordPress extensions is a brutal mess, with literally tens of thousands of them, produced by developers of drastically different qualification. The two basic practices to mitigate and save your sanity: If you are in a planning stages ...


1

There are many WordPress plugins that let you manage your email subscription. But overall this is not recommended, mainly because it creates a heavy load on the server. What will inevitably create a problem with the hosting service. In my experience, it is advisable to work with professional external services. For various reasons among which I highlight: ...


0

Ideally one of those plugins would have an option to load their CSS file last or first. You'd want the AIO Button to load last. Otherwise you could edit the CSS class with the color you want as '!important' like jimihenrik suggested, although that's not recommended for long term solutions. Or you could overwrite the offending CSS style from Genesis Design ...


1

Your code does seem ok, so it is hard to guess why are you not getting expected result. One thing to note is that WordPress ships with its own copies of Backbone and Underscore, it is considered a good practice to use its copies in such case. The scripts you don't "need" are likely coming from core and/or plugins you have installed. Which probably have ...


0

On the definition of the aio-orange button in the all-in-one-buttons/css/display.css?ver=4.1.1 add !important after the #FFF. The color is overwritten because you load the AIO styles first and later some other style that overrides button styles or what not. With !important you can tell the browser to use that one even though it's not the latest definition. ...


1

Nope. Unortunatly 1 directory depth is hardcoded as second argument for get_files method in method WP_Theme -> get_page_templates.


0

This is rarely as simple as it sounds as new themes usually require some adjustment of the content (different image sizes? different menus?) and maybe new plugins or setting changes. It is not impossible, but the work required to actually be able to do it is different from site to site. Of course if all you do is CSS changes it should be easy to add a ...


0

After taking a look to themes code I realized that all those html parts I wanted where hardcoded on the themes files, so there wasn't any nice way to retrieve those chunks of html I followed Strap1 comment and enabled my plugin to override my template, otherwise I parse the file page.php from the theme, to extract the html I need, using the function ...


0

There is no intended way whatsoever in WordPress to opt out of updates. Even not intended way is significantly convoluted and needs to intercept HTTP requests being made. You can disable updates completely with DISALLOW_FILE_MODS constant. If you have to retain update functionality for other stuff you will have to code it from scratch or use a third party ...


0

You can add a custom filed for Download that post type. You can check below link how to add custom meta fields in post http://codex.wordpress.org/Function_Reference/add_meta_box


0

Sure you can . If you want to add one/many file in your post , then you have to create custom field . There is a plugin called ACF ,this will help you to do so very easily . Please have a look to the link below Advance custom field file upload


1

It's doable with a user agent string "sniffer". Take a look at this project: http://mobiledetect.net Mind you, this approach can be troublesome as most modern browsers can 'fake' their user agent strings. Also, this approach doesn't work to well with caching systems. I've implemented it successfully on a project I worked on, and I know it's possible but ...


1

This: $thm_out[array_rand($thm_out, 2)] is the same as $them_out[array(0,2)] where 0 and 2 are 2 random keys. See array_rand I hope you can see what is wrong there. Change that to: $thm_out[array_rand($thm_out, 1)] which is the same as $them_out[2] where 2 is any random key.


0

Slightly hard to follow you here, but from the file you posted there is a line: $excerpt = implode(" ",$excerpt)."..."; Change it to: $excerpt = implode(" ",$excerpt); Edit - Corrected line, should work now.


1

Set the display argument of the function to false. <h2> <?php if (is_category()){ echo 'Category: ' . single_cat_title( '', false); } ?> </h2> Or, to use the function in its more "helpful" form you could do: single_cat_title('Category: '); If the display argument is true, WordPress automatically ...



Top 50 recent answers are included