How can the colon be removed or changed from the Custom Post Type UI/Taxonomies/Singular Label? This colon shows up in my page title in Wordpress and looks like this "Recipes for: Dinner". Thank you!
Related
I'm using Advanced Custom Fields' flexible content area in a Wordpress theme that I'm developing. One of my sub_fields requires a textarea.
When I make my get_sub_field call from my template it is already wrapped in <p></p> tags. How do I go about adding a class to that paragraph?
Example:
get_sub_field('textarea');
Output:
<p>This is my textarea.</p>
Desired:
<p class="my-class">This is my textarea.</p>
Thanks for your help!
Go to your Textarea custom field settings and change "Automatically add paragraphs" to none.
So WP-admin-> Custom Fields -> Field group -> then your field group-> edit textarea-> look for "Controls how new lines are rendered"
You can add a second false argument to get_sub_field() to disable reformatting on a case-by-case basis in the template:
get_sub_field('textarea', false);
I have a shortcode [table id=table /]
I want to do something like this <?php echo do_shortcode('[table id="'.$post->post_name.'"/]'); ?>
I want the slug to appear as the table id.
What am I doing wrong?
Given that you mentioned in the comments that you're trying to use this shortcode in a widget - widgets don't parse shortcodes by default.
To make most widgets parse shortcodes (most being those with text fields that apply the widget_text filter), you can add the following to your theme's functions.php:
add_filter("widget_text", "do_shortcode");
You can then refer to this shortcode directly in your widget text like you would expect you can:
[table id=... /]
EDIT:
If you have any trouble running shortcodes that are on their own line, it may be because they get wrapped in <p></p> tags automatically by Wordpress. To stop this happening, add this filter before the one added above:
add_filter("widget_text", "shortcode_unautop");
The shortcode_unautop() function simply stops shortcodes from being wrapped in paragraph tags like is Wordpress' default behaviour in most text fields.
I am new to modx. I am using MIGX to create some CMP. I gave the menu tab name as migx.hello and in core->compontents->migx->lexicon->en->default.inc.php I added a label
$_lang['migx.hello'] = 'Hello World';
But the when I load the page page, its showing migx.hello and not showing the value. Can someone help me in this.
Always clear cache after after changes in lexicon.
Never change the lexicon in files, use "Lexicon Management" instead.
I am not sure what title to give to this topic, so i apologize.
I am having WP blog running customized theme, and i installed Wordpress Popular Post Plugin.
It works as it should, but just after the link, it displays weird character that shouldnt be there ":".
It looks like this:
Post Title Link
:
<span class="wpp-excerpt">WThis is post excrpt bla bla</span>
I really dont have any idea why it is showing there.If anybody have any suggestion/advice, i would be very grateful.
This is the link, Top Section in the right sidebar
The answer you're looking for is in row 1140 of the plugin file.
$excerpt = ": <span class=\"wpp-excerpt\">" . $excerpt . "</span>";
Just remove the colon and you're done.
I would like to create a metabox in the section of edit post menu. Like Tags for exemple, BUT instead of inserting tags I would like to put a link (ex. http://www.google.com) + name.
This link should go right to the end of my post content as a hyperlink with "Source: Name (hyperlinked by specified link)
Here is an example of what I am needing:
Title
This post is for example
Source: Google
Any help would be much appreciated. Thanks guys.
You can use the Custom Fields in Wordpress posts to add extre information to a post, then in your theme you can just grab the values. Here is what I use on my blog:
$custom_fields = get_post_custom($post_id);
if(!empty($custom_fields['article_source_url'][0]) && !empty($custom_fields['article_source_title'][0])){ ?>
<strong>Source</strong>: <?php echo($custom_fields['article_source_title'][0]); ?>
<?php }
Then in your wordpress post just add a Source URL and Title in the custom fields box:
You can use WP's Custom Fields to denote specific parameters for each page/post.
Then, in the template, just call them like this:
<?php
$custom_fields = get_post_custom();
var_dump($custom_fields);
?>
Note that they are arrays, so in case you have a field named URL, you'd need to call it like
echo $custom_fields['URL'][0];
This is done like this so you can have multiple values for the same field.
Also, in order to see the Custom Fields box, you need to go to the Screen Options (top right of the edit page) and enable them.