Tag Info

New answers tagged

1

I am guessing a lot about how your themes work but, the child theme's functions.php runs before the parent theme's functions.php, so anything loaded by the parent's functions isn't going to be present for you to remove. You need to hook your function so that it runs later. add_action('after_setup_theme', 'remove_custom'); Though you would need to mess ...


1

I am not sure what exactly you want. But I assume you want the desktop view in your mobile browser instead of responsive layout. You can use viewport to achieve this. Please check this tutorial: http://webdesign.tutsplus.com/articles/quick-tip-dont-forget-the-viewport-meta-tag--webdesign-5972


0

You should be able to add this to your wp-config after table prefix. define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); See reference to this here.


0

I don't think you can do this without some technical intervention. Basically, WordPress uses the site name that you provide in your WordPress Settings (and is saved to the database) to generate the links for your website. Here is what I just thought of: Create a plugin to solve this problem. The plugin will detect the referral site. you add a hook to the ...


1

So, after searching whole i got solution. add a new setting and add a new control. Inside of control, add new add_action( 'customize_register', 'custom_logo_uploader' ); function custom_logo_uploader($wp_customize) { $wp_customize->add_section( 'upload_custom_logo', array( 'title' => 'Logo', 'description' => ...


0

To all of you struggling to get custom scripts running from functions.php, here's how: WP v4.1.2 Th post is a custom template post I needed to load 3 JSs - parsleyjs.js, he.js (i18n), custom_JsScript.js I also wanted to have the CSS on a separate file Only load these for a specific post function donate_adding_scripts() { if (is_singular()) { global ...


0

What if you completely remove the loadDonateScripts function and just add the conditional before enqueuing the scripts like in the the following: function donate_adding_scripts() { if (is_single()) { global $post; if($post->ID=="8436"){ // only for post Id = 8436 wp_register_script('donateParsleyJs', get_template_directory_uri() . ...


1

It's a simple solution of Setting the menu position to Secondary navigation, AND Handheld Setting an empty menu for for position Primary navigation. In my screenshot I haven't removed the primary navigation though.


0

Had a similar issue to you. Your problem is the ad_trigger field is a TEXT field. You need to make this a VARCHAR to allow for indexing. TEXT types are not stored in the table. Instead a pointer is stored in the table and the data is stored elsewhere. While you can create an index for them, I think this process would be too complicated for use with ...


2

There are a bunch of different concepts and resources to achieve this, I would do something like this.. It may be easier to implement this in a theme. You could include template files in your plugin, or the plugin create shortcodes to output data. Add usermeta profile preferences. You would want to add a select field that gets populated from a taxonomy ...


0

There is the hook manage_${post_type}_posts_columns which can be used to do just that. Basic example: function wpse188743_events_cpt_columns( $columns ) { $new_columns = array( 'event_date' => __( 'Event Date', 'textdomain' ), ); return array_merge( $columns, $new_columns ); } add_filter( 'manage_events_posts_columns' , ...


0

You need to check against the value of layout: if ( get_theme_mod( 'layout' ) === 'stream' ) { // Stream } elseif ( get_theme_mod( 'layout' ) === 'grid' ) { // Grid } else { // Fallback }


0

To answear my question: It's a typo. `students_email` VARCHAR 850) NOT NULL, should be: `students_email` VARCHAR (50) NOT NULL, Oh the headache. When the typo is corrected it creates a new table.


2

Not sure what you are asking. You don't want anything on the homepage of your site? You can remove the widgets (the left side) in Appearance > Widgets in your admin. The Leave a Reply box looks like comments, which can usually be turned of on a page or post.


0

This is my personal view if I am the theme user. I would say it depends on the theme features If it's a one page theme? I will like to have all the options in the customizer window. If it's a niche/app based theme? I will just use the customizer for basic options and setup all the other options in my very Theme options panel in Admin Area.


1

WordPress com doesn't allow you to upload any customization, other than CSS via their paid customization feature. Notably you can download WordPress com themes (link is available in sidebar of theme info page) and use them in self hosted installation. However, given that WP com doesn't provide source for much of its environment, it's unlikely that you would ...


1

The CSS code syntax is not correct. For post and page specific CSS, you need to use something like this: /* Replace x with post/page id and post with page and vice versa*/ .page-id-x .hentry, .page-id-x .entry-footer { background-color: #RGBColor !important; }


0

This is still the case in 4.2.2. If DB_NAME or DB_USER is wrong, you get the nice "Can't select database" screen from wp-db.php. If DB_PASSWORD or DB_HOST is wrong, db-error.php gets called. Weird. Without db-error.php, the nice screen gets rendered for all four of the above errors, which is a more consistent user experience (just no webmaster email).


1

For outputting only li's add this to wp_nav_menu array: 'container' => '', 'items_wrap' => '%3$s',


0

Just because I added the question here, I found it ... So ... easy... so irritating... but I hope this answer will help anyone else with this issue quicker! changed 'hierarchical' => true to 'hierarchical' => false for the custom post type!


0

This is what I´ve done so far, I won't mark as correct answer yet in case there is a better approach that Im not aware. add_action('wp_enqueue_scripts',array( $this, 'remove_all_actions'), 99); public function remove_all_actions(){ if( 'custom-template.php' != get_page_template_slug( get_queried_object_id() )) return; global ...


0

This is going to be a bit crappy to achieve without any potholes. The problems that you are going to face are If you are going to paginate one set of posts, the other two will also paginate regardless You are going to hit some kind of failure once you run out of posts on any of the three loops while paging through one of the other loops which have more ...


0

It seems a little odd to only offer the admin bar for a page, but the easiest solution I can think of would be to use conditional functions to deregister scripts/styles and create custom template files for this specific page. Unfortunately, you'll have to figure out all the styles/scripts that are loaded add_action('init', 'remove_all_the_things'); ...


0

The theme changes in customizer are applied inline or before the </head> to your WordPress site. Technically speaking there are three hooks: $wp_customize customize_register wp_head which are used by theme developers to include the changes directly to theme without using the default style.css


2

If you mean the WordPress Customizer: These changes are not saved to the style.css, but they come most likely to be found shortly before </head>. Probably you will find there something like <style> //definitions via Customizer </style>


3

If you want to add your own tags to WordPress pages use the wp_head action. To modify or remove <head> elements being added by Yoast you'll need to use the filters they provide. As documented in that link you can modify the page title, author, keywords and more.


0

Based on the comments of @Milo and using the rewrite analyzer plugin I found what I understand as a conflict in the rewrite rules?. The following url: exams/high-school/city-name/subject/math/ matches the following rules Pattern: (.?.+?)/page/?([0-9]{1,})/?$ Subtitution: pagename: exams/high-school/city-name/subject/math paged: 1 Pattern: ...


1

I ended going the CPT route, as I couldn't figure out other way. Just added a bunch of logic to duplicate/modify/delete the normal posts when needed. <?php // function for the CPT function SU_kuuma_kysymys_type() { // creating (registering) the custom type register_post_type( 'kuuma_kysymys', /* ...


0

Your code is good except in add_setting. You have assigned option for type parameter. It will save separate option for each field. If you use theme_mod, it will solve your problem. 'type' => 'theme_mod',


3

I think you're over thinking things. I'd simply create a new Custom Post in the plugin. That will come with it's own backend automatically. You can then create the individual pages based on the Template Hierarchy for both the listings and individual pages. For any additional fields you need, you can either set the meta fields to show on the backend or add ...


1

If you want to remove items from the toolbar you could try using $wp_admin_bar->remove_node like so: You'll have to use an inspect element to find out the IDs but if you would want to remove the WordPress logo you could inspect it and see: <li id="wp-admin-bar-wp-logo" class="menupop"> … </li> Then you would target the ID like so: function ...


-2

I think you need to change your permalink structure for all your past posts and future posts? Just go to setting-> Permalink and type in custom permalink there, Now secondly I would recommend you to use Permalink Finder Plugin (Not Updated but is not having any compatibility issues), it will automatically redirect your posts to the changed permalink...I ...



Top 50 recent answers are included