Questions tagged [codex]

Used for questions about Wordpress ( from https://codex.wordpress.org/ : WordPress Codex, the online manual for WordPress and a living repository for WordPress information and documentation)

80 questions
0
votes
1 answer

Extract number values from string in WordPress custom field

Inside WordPress, every post has a single custom field with this kind of "value": HTML:5, JQUERY: 20, PHP:38 This value is different in every post, not only for numbers, but also for names. I mean that other post could have: CSS:90, HTML5: 32,…
0
votes
1 answer

Add Span Class to Wordpress Title

I am trying to acheive the following output in my HTML

This is the Blog Title

Using my basic knowledge of the Wordpress Codex and PHP, I am currently achieving this using the following…
BuiltBySam
  • 11
  • 1
  • 4
0
votes
1 answer

How to add before_widget 2 div

register_sidebar( array( 'name' => __( 'Main Widget Area', 'predator' ), 'id' => 'sidebar-1', 'description' => __( 'Appears in the footer section of the site.', 'predator' ), 'before_widget' =>…
Ravi Patel
  • 5,121
  • 2
  • 25
  • 44
0
votes
1 answer

get_post title wordpress show comment box

I use this code for show all titles by catgory id use inside a shortcode function. global $post; $args = array( 'category' => 8); $myposts = get_posts( $args ); foreach( $myposts as $post ){ $post_title=$post_title."
".$post->post_title; …
metalbox
  • 302
  • 4
  • 17
0
votes
1 answer

Stuck trying to call in custom post types into wordpress

Evening all. I need a little help. I have the following code which brings in a list of portfolios, and places them on a page in a grid format. At present the code brings in all the portfolio types (of which there are 3, divided into different…
Project-404
  • 305
  • 2
  • 13
0
votes
1 answer

Wordpress List Child Pages like a Category

I'm trying to create a page in Wordpress that acts like a Category page listing the child pages. (like it would on the category page). I would like to add a custom field as the excerpt since pages don't have excerpts (unless there's a simple plugin…
Brent
  • 67
  • 6
0
votes
1 answer

Genesis - Turn off menu on certain pages

I want to turn off a the menu on certain pages in a genesis framework for WP. I have the following code: function turn_off_menu() { if (!is_front_page() || !is_page('blog')) { remove_action( 'genesis_after_header','genesis_do_nav' )…
rhysclay
  • 1,645
  • 3
  • 22
  • 42
0
votes
1 answer

Set Facebook wordpress plugin fields while using wp-insert-post

I am using wp-insert-post to create posts dynamically in wordpress. The script is in an external file and I have included the wp-load.php file to make use of the wordpress functions there. My query is that while using the wp-insert-post function, we…
Pratik Kapasi
  • 90
  • 1
  • 6
0
votes
1 answer

Different excerpt options on one page

I want to be able to display various excerpt length, and different read more buttons that will say: "really? found out more" and "get more info" to different sections of the same page. So far I found out from the wordpress codex that I can define…
Damir
  • 342
  • 9
  • 21
0
votes
2 answers

WordPress get post thumbnails in a custom pattern

Right now I have for each post two sizes for thumbnail: $big = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail_600x200' ); $small = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail_200x100'…
Helper
  • 59
  • 2
  • 2
  • 8
0
votes
1 answer

Need WordPress Archive to display in a certain format

my WordPress blog currently shows archives in a month by month format. Like this: November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 ..... and so on I need it to display in such a way that the current year shows all…
0
votes
1 answer

Custom Select Query by meta key and cat id

I have this custom query that get the expiry date of the post and orders post by that. How do I amend it to only list from a certain category id e.g. '20' $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta …
Navnish Bhardwaj
  • 1,687
  • 25
  • 39
0
votes
2 answers

Showing Plugin in post page wordpress theme development

I am learning how to develop wordpress theme. I want to share posts. I am using social sharing by loginradius plugin. Plugin url: https://wordpress.org/plugins/loginradius-for-wordpress/ I enabled this plugin. but social sharing widget is not…
Faisal Ahmed
  • 91
  • 1
  • 1
  • 5
0
votes
2 answers

Wordpress Shortcode syntax error, unexpected '}'

I am learning how to make wordpress theme. I am doing pretty well. Now I want to make shortcodes. But is is showing Parse error: syntax error, unexpected '}' in E:\xampp\htdocs\wordpress\wp-content\themes\freedom\shortcodes.php on line 17 . I…
0
votes
3 answers

query single post with wp_query

I retrieved the latest posts in front page with WP_query loop, coz i figured out that's the best solution. but i want to display the post was clicked in front page. what's the best method for single post query? I used wp_query again in single.php(is…
Miller
  • 105
  • 1
  • 2
  • 11